View Single Post
Old 07-27-2023, 07:41 PM   #36
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,605
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Karellen View Post
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).
DiapDealer is offline   Reply With Quote