Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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.


Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://859843]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2016-12-04 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (69 votes). Check out past polls.