Gist with my answers: https://gist.github.com/jpsim/8057500 If you look at the revisions, you'll see my 1st iteration was mostly identifying patterns, then with more and more cheating (and looking at this thread) to squeeze every point possible.
Regex Golf
121–130 of 189 posts
Re: Regex Golf
#122(.+|)foo(.+|) Lol so awesome this. I oblige. Much love!
Powers: ^((((((((((x)\10?)\9?)\8?)\7?)\6?)\5?)\4?)\3?)\2?)\1?$ I feel like there's gotta be a sneakier way of doing this.
^(x|xx|xxxx|x{8}|x{16}|x{32}|(x{64})+)$Re: Regex Golf
#123I figured out Ranges! abac|accede|adead|babe|bead|bebed|bedad|bedded|bedead|bedeaf|caba|caffa|dace|dade|daff|dead|deed|deface|faded|faff|feed Edit: /s
Prime: ^x{2,3}$|^x{5}$|^x{7}$|^x{11}$|^x{13}$|^x{17}$|^x{19}$|^x{23}$|^x{29}$|^x{31}$|x{33}
^(?!(..+)(\1)+$)
Re: Regex Golf
#124I got Four for 196 with (.).*\1.\1.*\1 and Order for 156 with ^a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*$
^[a-i]*[l-z]*$Re: Regex Golf
#125Re: Regex Golf
#126Re: Regex Golf
#127^(?!(..+)(\1)+$) Why does that work on primes? I got it by mistake when fiddling with the parenthesis locations but I was expecting to have to deal with xx separately.
Re: Regex Golf
#128Earlier quoted context omitted.
From: http://quaxio.com/triple/ ^([0369]|[258][0369]*[147]|[147]([0369]|[147][0369]*[258])*[258]|[258][0369]*[258]([0369]|[147][0369]*[258])*[258]|[147]([0369]|[147][0369]*[258])*[147][0369]*[147]|[258][0369]*[258]([0369]|[147][0369]*[258])*[147][0369]*[147])*$
569pts: ([^31]0|31|[017]2|[03]03|[^1]4|(900|01|7)5|6|[48]7|[57]8|09)$
580pts: 00(0$|3|6|9|12|15)|[^0]14|.53|^3[^38]|55|43|23|9.7
Re: Regex Golf
#129I got Four for 196 with (.).*\1.\1.*\1 and Order for 156 with ^a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*$
Order for 198: ^[^o].....?$ Probably not what was wanted, but it works (or maybe it was to trick people onto a false path)
I must say Regex golf is a lot of fun.