fun with regular expressions
David Harris
dharris at drh.net
Thu Aug 26 15:57:11 CDT 1999
I wrote this one night for the heck of it, because some guy asked if I could do
it. It's a cute regular expression, so I though you all might be interested for
the novelty of it.
$_="JOIN THE JAX PERL MONGERS J zbjrnmuhkkd Pdqk Mnmfdqr J\n";
tr/za-y/a-z/; / ((.)) /; do { print substr($_,25); }
while ( s/((.).{23}) $2 (.)(.*) (.)$/$1$5 $2 $4 $3/ )
Ya just gotta love perl!
- David Harris
Principal Engineer, DRH Internet Services
More information about the Baltimore-pm
mailing list