Reposting this from Reddit
Dec. 26th, 2011 01:07 amFrom Reddit, a Perl regex that matches prime numbers (in unary).
ehtraax: This isn't a comment on the title since it clearly says "Perl regular expression", but perhaps it would be good to note that this is not an actual regular expression.
Sniffnoy: Of note though is that the only thing it uses to make it more powerful than a regular expression is backreferencing -- which shows just how powerful backreferencing is, really...
ehtraax: That's like saying "The only thing making us smarter than caterpillars is our brains -- which shows just how powerful our brains are, really..."
Sniffnoy: Well, it's true! :D
ehtraax: You are technically correct.
(I decided to not make the cliched response to that. This being Reddit, good chance someone else will make it for me.)
EDIT: Yup, someone did. Goddammit guys.
Actually, I'm not sure why ethraax thought that was such a worthless statement? Maybe he considered it obvious?
-Harry
ehtraax: This isn't a comment on the title since it clearly says "Perl regular expression", but perhaps it would be good to note that this is not an actual regular expression.
Sniffnoy: Of note though is that the only thing it uses to make it more powerful than a regular expression is backreferencing -- which shows just how powerful backreferencing is, really...
ehtraax: That's like saying "The only thing making us smarter than caterpillars is our brains -- which shows just how powerful our brains are, really..."
Sniffnoy: Well, it's true! :D
ehtraax: You are technically correct.
(I decided to not make the cliched response to that. This being Reddit, good chance someone else will make it for me.)
EDIT: Yup, someone did. Goddammit guys.
Actually, I'm not sure why ethraax thought that was such a worthless statement? Maybe he considered it obvious?
-Harry