Re:Regex Golf
by tareqak on Friday December 20, 2013 @09:51AM
(#6941602)
I got Four for 196 with
and Order for 156 with
[ Parent
| on HN ]
Order for 198:
^[^o].....?$
Probably not what was wanted, but it works (or maybe it was to trick people onto a false path)This right here is why test cases are always blackboxed...
Makes my similarly off-track score of 184 seem foolish:
^[a-g][^airn]|[fs].*y$|ot$Nice, I earned 197 with:
^[a-m].{1,5}$
I must say Regex golf is a lot of fun.
Nice, turn it around for 199:
^.{5}[^e]?$
Re:Regex Golf
by raverbashing on Saturday December 21, 2013 @10:23AM
(#6946852)
or ^[^o].{1,5}$
198 points
Balance (194)
^<.*>$|^<<.*>>$|^<<<.*>>>$
Re:Regex Golf
by nadinengland on Friday December 20, 2013 @11:13AM
(#6942082)
Balance (286)
^(<(<(<(<(<(<<>>)*>)*>)*>)*>)*>)*$
If we had named captures: ^(((?<P><)|(?<-P>>))*(?(P)(?!)))$Balance (288) with one bad match:
^(<(<(<(..)>)>)>)$
Balance (212)
[<>]{28}
Re:Regex Golf
by chrismorgan on Friday December 20, 2013 @10:05AM
(#6941664)
Four: 199
(.)(.\1){3}
Order: 168 ^a*b*c*d*e*f*g*h*i*l*m*n*o*p*r*s*t*w*y*z*$
(You just didn't remove unused letters.)Order for 195
^[a-g]*[^a-g]*$
Re:Regex Golf
by ryanthejuggler on Friday December 20, 2013 @10:25AM
(#6941786)
Order for 170.
^([ab][c-gio][^d]|c[ehlo]|d|f[il]|gh|mo)
Not as clever as you guys though!Order for 196:
^[a-i]*[l-z]*$Or just (.).\1.\1.\1 for Four (198)
Re:Regex Golf
by MereInterest on Friday December 20, 2013 @11:53AM
(#6942345)
So long as we are going down this route, you can shave off another character with (.)(.\1){3} (199).
Re:Regex Golf
by maxerickson on Friday December 20, 2013 @11:58AM
(#6942374)
Can chop out one check to save a character:
(.)...\1.\1