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

Re^2: Match a pattern only if it is not within another pattern

by Transient (Hermit)
on Aug 16, 2005 at 19:51 UTC ( [id://484227]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    bl123 and barthis123thatqux and barso123quxhim and123som 123
    
  2. or download this
    $str =~  s/((?<!bar)\S*)foo((?!\S*qux))/${1}123${2}/gx;
    
  3. or download this
    bl123 and barthisfoothatqux and barsofooquxhim and123som 123
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found