Live data from Hacker News

The true power of regular expressions (2012)

npopov.com

61–62 of 62 posts

Re: The true power of regular expressions (2012)

#61

Earlier quoted context omitted.

You’re splitting hairs. The author is writing from the perspective of a PHP programmer (author is in fact a major PHP contributor), where the term “regex” has a single very clear definition, namely PHP’s PCRE-based implementation.

No, this is not splitting hairs. This is the author using the straight up wrong terminology. Regex can’t match HTML, and aren’t NP-complete. The fact that the author believes that “regex obviously means PCRE” is objectively wrong and misleading in the sense that all the things his article are about would have another conclusion if he actually talked about Regex. It’s like if there was a library called QuickSort which…

I eagerly await your angry letters to the authors of pretty much every programming language in use today that their RegExp class isn't, in fact, a regular expression implementation and needs a better name.

Re: The true power of regular expressions (2012)

#62
post #33

Obligatory: https://stackoverflow.com/a/4234491 (tchrist's "Oh Yes You Can Use Regexes to Parse HTML!", which refers to https://stackoverflow.com/a/1732454/459233 "TONY THE PONY, HE COMES" (I won't risk copy-pasting the "corrupted-looking" version, heh))

omigosh - this is an internet classic that never gets old!
Post reply on HN