Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
XP is just a number
 
PerlMonks  

Re: Regexp Question

by I0 (Priest)
on Jun 11, 2002 at 16:18 UTC ( #173541=note: print w/ replies, xml ) Need Help??


in reply to Regexp Question

$_ = '${ThisOne} ${This${One}} ${This${One}Too} ${This${One}and${also}this}'; ($re=$_)=~s/((\$\{)|(\})|.)/${[')','']}[!$3]\Q$1\E${['(','']}[!$2]/g; print join"\n",eval{/$re/},"",""; warn $@ if $@ =~ /unmatched/; $re = join '|',map{quotemeta}eval{/$re/}; print join"\n",/\$\{($re)\}/g;


Comment on Re: Regexp Question
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://173541]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2014-04-20 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls