3 ms·
I made an anti-regex comment ( https://news.ycombinator.com/item?id=26310559 https://news.ycombinator.com/item?id=26310559) a few days ago that could be miscons
by perl4ever 6y ago
I made an anti-regex comment (
https://news.ycombinator.com/item?id=26310559 https://news.ycombinator.com/item?id=26310559) a few days ago that could be misconstrued as inviting this sort of response. But I was talking about XML in files used for data interchange that were sometimes a gigabyte or two.
There's a link in the stackoverflow thread to a purported XML parser using regexes at https://www2.cs.sfu.ca/~cameron/REX.html#IV.3 https://www2.cs.sfu.ca/~cameron/REX.html#IV.3
Looking at the CDATA section, I think it's an example of the sort of pitfalls you run into. He thinks you can put "arbitrary content" in it, but that's a pet peeve of mine; it's not so. I once got a file to ingest that made that mistake, so I'm sure he isn't the only one.