$_ = '${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;
In reply to Re: Regexp Question
by I0
in thread Regexp Question
by armadilloman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |