I'm looking for a regex that returns true if there is NO match.<br>And it has to be inside the regex itself, and not via the control structure outside of it.<br>(Whatever it is... it has to happen in between the delimiters.)<br>
<br>I.e. Ordinarily you might do:<br><br>if ($x =! /normal/) { print "not normal\n"; } else { print "normal\n"; }<br><br>In psuedo code what I'm looking for would be something like:<br>
<br>
/!normal/<br>
<br>I tried a 'A zero-width negative look-ahead assertion' which sounded<br>like what I wanted, but my understanding must be wrong. I tried<br><br>perl -e '$_='normal'; if (/(?!normal)/) { print "not normal\n"; } else { print "normal\n";}'<br>
<br>but that didn't work.<br>Any ideas? or am I missing something?<br><br>TIA<br>Fulko<br><br><br><br>