Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re^2: multiple (different) substitutions on same $foo (at once)

by halley (Prior)
on Aug 22, 2003 at 12:56 UTC ( [id://285762]=note: print w/replies, xml ) Need Help??


in reply to Re^2: multiple (different) substitutions on same $foo (at once)
in thread multiple (different) substitutions on same $foo

However, the original poster specified one /g and two non-/g replacements. If that is the real intent, then a data-table solution would need to flag the repeatable replacements versus the singular replacements. If they all should be repeatable, then the data solutions offered are very useful.

Also, a note to the original poster: s/man/boy/ would create a lot of strings like "read the fine boyual" in a general text. You may want to learn what the zero-width assertion \b does inside a regex. s/\bman\b/boy/g; s/\bmen\b/boys/g may help you out.

--
[ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-03-28 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found