<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I've deleted the rest of the thread, but what about<br><div><br></div><div>$string =~ /^(?:(?!good).)*$/</div><div><br></div><div>to check that $string doesn't contain good?</div><div><br></div><div><div>&nbsp;&nbsp;DB&lt;1&gt; x 'bad' =~ /^(?:(?!good).)*$/</div><div>0 &nbsp;1</div><div>&nbsp;&nbsp;DB&lt;2&gt; x 'good enough' =~ /^(?:(?!good).)*$/</div><div>&nbsp;&nbsp;empty array</div><div><br></div></div><div>Mike</div><div><br></div><div><div>On Mar 12, 2009, at 10:44 AM, Fulko Hew wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><div class="gmail_quote">On Thu, Mar 12, 2009 at 10:30 AM, Adam Prime <span dir="ltr">&lt;<a href="mailto:adam.prime@utoronto.ca">adam.prime@utoronto.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br> Fulko Hew wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Alex asked:<br> <br> &nbsp;&gt; Couldn't you just use the ~! on the regex instead of ~=?<br> </blockquote></blockquote><div><br>... snip ...<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> </blockquote> <br> it's !~, not ~!<br> <br> ie:<br> <br> aprime@primepc:~$ cat haha.pl<br> <br> my $text = 'haha';<br> <br> if ($text !~ /hat/) {<br> &nbsp; &nbsp;print qq[yay\n];<br> }<br> else {<br> &nbsp; &nbsp;print qq[yay\n];<br> }<br> aprime@primepc:~$ perl haha.pl<br> yay<br> <br> also, given your example there, why wouldn't you just<br> <br> return true unless $_ eq 'good';<br></blockquote></div><br><br>Because I'm not allowed to rewrite the code, but simply insert a<br>different regex pattern in between the slashes.<br> _______________________________________________<br>toronto-pm mailing list<br><a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/toronto-pm">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--&nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="khtml-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Stok &lt;<a href="mailto:mike@stok.ca">mike@stok.ca</a>&gt;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://www.stok.ca/~mike/">http://www.stok.ca/~mike/</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="khtml-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The "`Stok' disclaimers" apply.</div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div></div><br class="Apple-interchange-newline"></span> </div><br></body></html>