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

Re: Want a faster replace, Please

by Kanji (Parson)
on Sep 12, 2010 at 13:12 UTC ( #859843=note: print w/ replies, xml ) Need Help??


in reply to Want a faster replace, Please

my $AUBBC_TAGS = join '|', @AUBBC_TAGS; my $message = '[b] stuff [i] stuff [/i] [/b]'; $message =~ s{\[(.?)?($AUBBC_TAGS)\]}{<$1$2>}xgo; # or s{\[(/?(?:$AUBBC_TAGS))\]}{<$1>}xgo; print $message;

    --k.



Comment on Re: Want a faster replace, Please
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2014-08-27 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (237 votes), past polls