3 ms·
> That wasn't a poor choice. I didn't propose "si.+?nk" as a general rule, and I would have used another method if there had been conflicting tags in the file.
by kbenson 14y ago
> That wasn't a poor choice. I didn't propose "si.+?nk" as a general rule, and I would have used another method if there had been conflicting tags in the file.
I wasn't really speaking to any criticism of you in particular, but to the general statement about assumptions when using Perl.
I myself have used a regex to pull out well formed XML chunks and then re-parse them with a regex to build a hash out of the attributes of each chunk. It turns out it's 10x faster that any XML solution I could find (and there's quite a lot on CPAN!). The fact that it was a few hundred MB of XML and with a regex I could step my way through it probably had a lot to do with that...