in reply to Re^2: refine regex
in thread refine regex

Don't need the trailing ' ?'.
$string =~ s! ?NOT (?:".*?"\[MESH\]|\(.*?\))!!g;
works fine.