Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Replacing consecutive tokens in 1 pass

by OM_Zen (Scribe)
on Feb 21, 2003 at 18:54 UTC ( #237539=note: print w/ replies, xml ) Need Help??


in reply to Replacing consecutive tokens in 1 pass

Hi ,

my $str = "|90|93|foo|bar|91|92|95|96|906|"; $str =~ s/(?<=\|)9[0-6](?=\|)/X/g; print "[ $str ]\n"; __END__ Also , you can go through this tutorial
Extended Patterns regular expressions


Comment on Re: Replacing consecutive tokens in 1 pass
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2014-11-28 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (194 votes), past polls