Dec. 26th, 2011

sniffnoy: (Golden Apple)
From 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

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031
Page generated Jan. 7th, 2026 02:00 pm
Powered by Dreamwidth Studios