Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Reverse Regex

by jbware (Chaplain)
on May 13, 2005 at 03:27 UTC ( [id://456594]=obfuscated: print w/replies, xml ) Need Help??

Apparently I have too much time on my hands... This isn't so much an obfu as I just wanted to see if I could do it w/ a regex and w/o leveraging the typical methods of reversing a string. And it didn't really seem to fit anywhere else :)
$_='?od lliw xeger a nehw noitcnuf a esu yhW'; while((s/(.)$/$,.=$1;$==length$_;($=!=1)?'':$,;/e)&&($=>length$_)){} print "$_\n";

-jbWare

Replies are listed 'Best First'.
Re: Reverse Regex
by jdalbec (Deacon) on May 13, 2005 at 22:46 UTC
    $_='?od lliw reifidom g/ eht nehw pool elihw a esu yhW'; s/(.)/$,=$1.$,;$==length$';($=!=0)?'':$,/eg; print "$_\n";
      Good call ++

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://456594]
Approved by Tanktalus
Front-paged by dfaure
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-20 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found