Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: better way to escape escapes (updated)

by LanX (Chancellor)
on Apr 16, 2014 at 01:09 UTC ( #1082413=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<120> $str='xxx@@xx\@xx@abc\@xxx@efg@\xxx'
     => "xxx\@\@xx\\\@xx\@abc\\\@xxx\@efg\@\\xxx"
    ...
    
      DB<122> grep { defined } $str =~ m/ (?: [\\\@]{2} | ( \@\w+ ) | . ) 
    +/xg
      => ("\@abc", "\@efg")
    
  2. or download this
      DB<135> grep {defined} $str =~ m/ (?: [\\\@]{2}+ | ( [\\\@]\w+ ) | [
    +^\\\@]+ ) /xg 
     => ("\@abc", "\@efg")
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1082413]
help
Chatterbox?
[zentara]: Corion in this cased they left the www. out
[zentara]: /d// :-)
[LanX]: i like tk, just joking. but what about modern styles?
LanX has to run. .. o/
[zentara]: modern styles are secondary to display readability. Tk is automatically good at the clunky industrial theme. :-)
[ww]: Amen!

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2017-05-26 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?