您好,请帮我删除- /buyDIGITAL_
也就是说,这里的数字可以是一个随机数。在符号 _ 的末尾
// Проверяем наличие района
$proddist= preg_replace('#/buy#USi', '', $message);
preg_match("/^([^_]*)_(.*)$/", $prodres);
$mestod = DB::$the->query("SELECT mesto FROM `sel_districts` WHERE `mesto` = '".$proddist."' ");
$mestod = $mestod->fetchAll();
if (count($mestod) != 0)
{
$chat = escapeshellarg($chat);
$message = escapeshellarg($message);
exec('bash -c "exec nohup setsid php ./select.php '.$chat.' '.$proddist.' > /dev/null 2>&1 &"');
exit;
}
这就是我如何删除单词 /buy how to remove the WORD + Number + sign _ in this
谢谢
或多或少是这样的:
在这里你可以很容易地用字符串函数解决
http://sandbox.onlinephpfunctions.com/code/9061a138e4856e182578cde8b03108d9280a5661