Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Search and Replace

by greenhorn (Sexton)
on Jul 19, 2000 at 21:00 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-25 08:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found