tags
I\'ve stumped myself trying to figure out how to remove carriage returns that occur between tags. (Technically I need to replace them with spaces, not
A single-regex solution is basically impossible here. If you absolutely insist on not using an HTML parser, and you can count on your input being well-formed and predictable then you can write a simple lexer that will do the job (and I can provide sample code) -- but it's still not a very good idea :)
For reference: