I am trying to parse XML with regular expressions - not a good idea ?
It's DITA actually - but that's XML also.
Tell me if this is a bad idea - the issue I'm working on is fixing up some XML files that have a whole list of "bad" tags - mostly removing them, but sometime having to replace them with something else.
Comment on Re^2: Search and replace over line break
XML is not a regular language (please note that "regular" has a specific meaning with regard to a language; look it up if you do not know what this means). Therefore, you cannot generally parse it with a regular expression.
Take an XML library that fits your need. Here are some descriptions of such.