Re:Regex Golf
by rplnt on Friday December 20, 2013 @11:05AM
(#6942028)
Mine is a bit shorter, though a bit more "meh" as well.
[ Parent
| on HN ]
Re:Regex Golf
by galen_tyrol on Friday December 20, 2013 @01:06PM
(#6942895)
improved, gives 80
^(x|(xx){1,9}|x{32}|(x{64})+)$I tried to get rid of those redundant ^ and $ but it somehow didn't work. I probably forgot to put it all inside one group.
They are not redundant. Any string of one or more exes is going to constrain a substring of exes of length 2^n (consider n=0 for a trivial proof), so you do need those anchors!