我需要一个PHP正则表达式,它匹配一行开头但没有结尾,带有一个短语.就像是:
$s = 'top bus stop'; $b = preg_match('/^top.*(?!top)$/', $s);
但实际上有效的.你怎么看?
php regex
php ×1
regex ×1