But wait... if you buy now, we'll throw in an extra $ to<br>make it work :)<br><br>/$$^/<br><br>-- <br>Charles DeRykus<br><br><div class="gmail_quote">On Wed, Aug 19, 2009 at 12:38 AM, Ingy dot Net <span dir="ltr"><<a href="mailto:ingy@ingy.net">ingy@ingy.net</a>></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><br><div class="gmail_quote"><div class="im">On Tue, Aug 18, 2009 at 10:33 PM, Steve Sandvik <span dir="ltr"><<a href="mailto:ssandv@gmail.com" target="_blank">ssandv@gmail.com</a>></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;">
well, /$^/ seems like a plausible starting point. Or ending point.<br>
Or something. :-)</blockquote></div><div><br>Nope.<br><br> $^ = "";<br> $anything =~ /$^/;<br><br> <br></div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<font color="#888888"><br>
Steve Sandvik<br>
</font><div><div></div><div><br>
On Tue, Aug 18, 2009 at 12:04 PM, Michael R. Wolf<<a href="mailto:MichaelRWolf@att.net" target="_blank">MichaelRWolf@att.net</a>> wrote:<br>
> Question:<br>
> What's the smallest (comprehensible) regex that's guaranteed to fail against<br>
> all input?<br>
><br>
> Motivation:<br>
> I'm creating a lab for perl classes. I want to provide the stub of a script<br>
> that compiles, but always fails to match. Unfortunately, the obvious<br>
> minimal RE of // matches *everything*.<br>
><br>
> Here's a stub of the lab...<br>
><br>
> # TODO... replace the following line with your regular expression to match<br>
> zip codes.<br>
> my $zip_re = qr//;<br>
><br>
> like('98107', $zip_re, 'Simple 5-digit zip'),<br>
> like('07748', $zip_re, 'Simple 5-digit zip with leading zero'),<br>
><br>
> unlike('1234', $zip_re, 'Four digits');<br>
> unlike('123456', $zip_re, 'Six digits');<br>
><br>
> --<br>
> Michael R. Wolf<br>
> All mammals learn by playing!<br>
> <a href="mailto:MichaelRWolf@att.net" target="_blank">MichaelRWolf@att.net</a><br>
><br>
><br>
><br>
><br>
> _____________________________________________________________<br>
> Seattle Perl Users Group Mailing List<br>
> POST TO: <a href="mailto:spug-list@pm.org" target="_blank">spug-list@pm.org</a><br>
> SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list" target="_blank">http://mail.pm.org/mailman/listinfo/spug-list</a><br>
> MEETINGS: 3rd Tuesdays<br>
> WEB PAGE: <a href="http://seattleperl.org/" target="_blank">http://seattleperl.org/</a><br>
><br>
_____________________________________________________________<br>
Seattle Perl Users Group Mailing List<br>
POST TO: <a href="mailto:spug-list@pm.org" target="_blank">spug-list@pm.org</a><br>
SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list" target="_blank">http://mail.pm.org/mailman/listinfo/spug-list</a><br>
MEETINGS: 3rd Tuesdays<br>
WEB PAGE: <a href="http://seattleperl.org/" target="_blank">http://seattleperl.org/</a><br>
</div></div></blockquote></div></div></div><br>
<br>_____________________________________________________________<br>
Seattle Perl Users Group Mailing List<br>
POST TO: <a href="mailto:spug-list@pm.org">spug-list@pm.org</a><br>
SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list" target="_blank">http://mail.pm.org/mailman/listinfo/spug-list</a><br>
MEETINGS: 3rd Tuesdays<br>
WEB PAGE: <a href="http://seattleperl.org/" target="_blank">http://seattleperl.org/</a><br></blockquote></div><br>