Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
galen_tyrol
· 12y ago · 0 comments
improved, gives 80
^(x|(xx){1,9}|x{32}|(x{64})+)$
Comments
[–]
rplnt
12y ago
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.
[–]
alanh
12y ago
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!
[–]
rplnt
12y ago
I meant my previous post where I had them in every single possibility.