Quote:
Originally Posted by JSWolf
This is why we need an update to regex to allow us to have more control so we can do things like this. Regex should be able to say I want the next instance of </span> after the <span>. But we cannot do it. So regex should be updated to handle such things.
|
Just because Regex can't do something it wasn't designed to do, doesn't mean Regex must be updated!
You would be using the wrong tool for the job, and what you want is a parser!
Here is some discussion on why Regex isn't recommended for parsing HTML:
https://stackoverflow.com/questions/...e-html-why-not
There is a reason why they are separate beasts.