Quote:
Originally Posted by Karellen
I keep reading that sentiment in this forum, but so far I have to disagree.
I am yet to come across an edit that I can't fix. Maybe it needs two or three steps instead of one (the challenge), but it gets done. And I have come across coding that I can only describe as trash in some ebooks.
Yes, those nested tags can be a problem, but working inside to out is the way I work around it.
When you come across coding that you believe can't be done by regex alone, I'd love to have a crack at it.
|
Well yes.... If you're tackling it in multiple steps, there's nothing you probably can't eventually solve with regex and time alone.
I was talking about those who look for the perfect one-pass regex to parse a rats nest of tag soup (while also covering all edge cases).
When people say "you can't parse html with regex," assume they mean "in one go". Because that's what most people are looking for when they come asking (and have to be let down).