Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Perl: the Markov chain saw
 
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 contemplating the Monastery: (4)
As of 2014-04-21 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (490 votes), past polls