|laziness, impatience, and hubris|
POD style regex for inline HTML elementsby Lady_Aleena (Curate)
|on Apr 15, 2013 at 00:13 UTC||Need Help??|
Lady_Aleena has asked for the
wisdom of the Perl Monks concerning the following question:
I have become somewhat enamored of how text is parsed by POD for inline HTML elements, like B<a string> or I<a string>. I have gotten a regex to work for them, however I have not been able to figure out how to nest them such as I<B<a string>>. Here is what I have so far:s/([A-Z]+)<(.+?)>/<\L$1\E>$2<\/\L$1\E>/g;
I have not gotten into adding ids, classes, styles, or other attributes yet.
Here is the list of tags I may use with this regex:
Before you ask, yes, I looked for it (for about an hour) on CPAN to no avail.
Thanks in advance!
Have a cookie and a very nice day!