Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by Laurent_R (Canon)
on Mar 02, 2018 at 22:00 UTC ( [id://1210268]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-24 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found