Earlier quoted context omitted.
I don't get what this is all about. The title was (most probably) derived from Code Golf, which is a competition in coding something with as few characers as possible. Code Golf was derived from Golf, where you want to use as few turns as possible. The score going up and not down, which is done because you get more points the more objectives you fulfill, does not change the objective of this game or what it is based…
> The score going up and not down, which is done because you get more points the more objectives you fulfill, does not change the objective of this game or what it is based on. Golf scoring penalizes you with more "points" by how many strokes you take. If you are playing a Par 4 and it takes you 6 swings to get in the cup you just got _penalized_ +2 If your partner gets in the cup in 2 swings he is awarded -2 Therefo…
Regex Golf
111–120 of 189 posts
Re: Regex Golf
#112I 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)
^[a-g][^airn]|[fs].*y$|ot$Re: Regex Golf
#113I 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
^x{2,3}$|^x{5}$|^x{7}$|^x{11}$|^x{13}$|^x{17}$|^x{19}$|^x{23}$|^x{29}$|^x{31}$|x{33}Re: Regex Golf
#114I 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
Re: Regex Golf
#115Re: Regex Golf
#116Re: Regex Golf
#117Re: Regex Golf
#118^(?!(..+)(\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.
Nice find. It works because it rejects "2 or more x's" repeated "2 or more times". So xx doesn't get rejected, but any multiple of that (xxxx, xxxxxx, ...) will be. The same way xxx doesn't get rejected, but any multiple of that (xxxxxx, xxxxxxxxx, ...) will be. You've solved it using the actual definition of prime numbers, no trickery needed. Well played. FYI, you don't need brackets around the \1, so can score 286.
Re: Regex Golf
#119Earlier quoted context omitted.
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.
Mine is a bit shorter, though a bit more "meh" as well. ^x{32}$|^(x{2}){1,8}$|^(x{64})+$|^x$
^(x|(xx){1,9}|x{32}|(x{64})+)$