Funny regexp: /^1?$|^(11+?)\1+$/
Posted: Thu Oct 07, 2010 1:08 am
I have found this funny regexp here, guess what it matches? Or check it with newLISP:
Astonishing! ;-)
Code: Select all
(for (i 1 100)
(unless (regex {^1?$|^(11+?)\1+$} (dup "1" i))
(print i " ")))