Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Search and Replace

by greenhorn (Sexton)
on Jul 19, 2000 at 21:00 UTC ( #23240=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $s = "Bla (bar;) bla bla; bla bla (foo; bar); bla bla 
    Bla bla bla; bla bla (foo; bar); bla bla 
    Bla bla bla; bla bla (foo; bar); bla bla 
    Bla bla (bar;foo;bar) bla; bla bla (foo; bar); bla bla 
    Bla bla bla; bla bla (foo; bar); bla bla
    ";
    
  2. or download this
     s/            # search for...
     \(            # a literal "("
     (             # begin storing what follows (in "$1")
    ...
     )             # stop storing in "$2"
     \)              # a literal ")"
     /($1,$2)/gx;        # and replace all that with...see below...
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-12-09 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?