in reply to Tag balanced with escape characters
You are trying to parse *ML with a regex. JUST SAY NO. Use an appropriate parsing module instead. (SGML::Parser, HTML::Parser, XML::Parser, etc) Because *ML can be nested, or have problems with conflicting tags and is just generally not regular, you should use a tool designed to pull it apart.
That said, your problem is that you are using parens as the beginning and ending delimiters on your q(). Try switching delimiters to something not in your input text. Maybe q{}?
Updated: xml parsers: do I need one?, How to use Regular Expressions with HTML, is XML too hard?, No xml module please ... for more insight
|
|---|