Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

When a regexp with /g needs to be run .. twice

by talexb (Chancellor)
on Mar 02, 2018 at 21:13 UTC ( [id://1210258]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      $foo = ':{"'
      $foo =~ s/([:,{])(.)/$1 $2/g;
      print "'$foo'\n";
    
  2. or download this
      ': {"'
    
  3. or download this
      ':  { "'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1210258]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found