in reply to XML parsing vs Regular expressions
The reasons are the same as for HTML parsing really. Your regular expression will do what you want it to do, probably, and then you'll come to trust it and it will come back to bite you when you meet an unexpected case.
- ignore code which is commented out?
- allow for attribute order changing?
- cope with the characters < and > appearing inside attributes, or CDATA sections?
Nobody says perl looks like line-noise any more
kids today don't know what line-noise IS ...