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.
In reply to Re: Want a faster replace, Please
by Kanji
in thread Want a faster replace, Please
by SFLEX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |