Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 cooling their heels in the Monastery: (4)
As of 2014-09-21 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls