Keep It Simple, Stupid | |
PerlMonks |
Re: Skipping special tags in regexesby dragonchild (Archbishop) |
on Dec 04, 2003 at 16:01 UTC ( [id://312230]=note: print w/replies, xml ) | Need Help?? |
Build dynamic regexes. Maybe something like:
That would handle the transform from the first to the second. Ideally, you would re-evaluate your regexes and build them using some regex builder. The builder would handle the optional tags and making sure they stayed in after the substitutions. ------
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In Section
Seekers of Perl Wisdom
|
|