Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Do you know where your variables are?
 
PerlMonks  

Apply A Set Of Regexes To A String

by Cody Pendant (Prior)
on Oct 11, 2004 at 01:58 UTC ( #398070=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
            $html =~ s/foo/bar/;
            $html =~ s/baz/quux/;
            $html =~ s/monkey/pants/;
    
  2. or download this
            $html =~ s/foo/bar/;
            
    ...
            }
            
            $html =~ s/monkey/pants/;
    
  3. or download this
            $replacements =
                [
                    ['foo','bar'],
                    ['baz','quux']
                ];
    
  4. or download this
            $replacements =
                {  
                    fix_foo => ['foo','bar'],
                    fix_baz => ['baz','quux']
                };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://398070]
Approved by BrowserUk
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2014-04-18 14:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (469 votes), past polls