Skip to content

Instantly share code, notes, and snippets.

@moret
Created January 7, 2014 18:58
Show Gist options
  • Save moret/8304660 to your computer and use it in GitHub Desktop.
Save moret/8304660 to your computer and use it in GitHub Desktop.
My answers to Regex Golf @ http://regex.alf.nu/
Plain strings (207): foo
Anchors (208): k$
Ranges (202): [a-f]{4}
Backrefs (201): (...).*\1
Abba (193): ^(?!.*(.)(.)\2\1)
A man, a plan (177): ^(.)[^p].*\1$
Prime (286): ^(?!(..+)\1+$)
Four (199): (.)(.\1){3}
Order (188): ^[abcdfgm](?![nar]|id)
Triples (0):
Glob (0):
Balance (286): ^(<(<(<(<(<(<<>>)*>)*>)*>)*>)*>)*$
Powers:
Long count:
Long count v2:
Alphabetical:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment