In response to a question about parsing XHTML with regexes.
Personally, I don’t agree with him, but just.. just wow.
It’s “Spad-joss”
>
I think that very occasionally you can get away with using regex to parse XHTML. For example, a WYSIWYG editor for our CMS *always* produces headings with markup that I can expect like so .
So I know I can get these headings with /(.+?)/
Yeah exactly right. It leaves you open for failure should the input change down the track, but for *small* amounts of reliable input, it’s not really an issue.