View Single Post
Old 07-28-2014, 04:11 PM   #21
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by JSWolf View Post
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.
Tex2002ans is offline   Reply With Quote