[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] A tiny bit of fun with a regex



Okay, so this doesn't exactly require a PhD to find, but I did find it
mildly amusing.  If you want it to be at all challenging, you can't
run it with -w or use strict.

  $_ = 'The score was 2/0 in the second inning.';
  print "found it\n" if /\d+
                         \/
                         \d+  # find something of the pattern y/x 
                        /x

-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications
|_____|   Richardson, Texas

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe