regex - Expression to match strings starting with string, but not containing some other string? -


how construct expression matches these:

start?foo=bar start.php starter 

but not these

dontmatch start?foo=dontmatch notstart?foo=bar 

i intend use in .htaccess file.

how expression:

\bstart.*$(?<!dontmatch) 

online demo


Comments