Skip to content

Instantly share code, notes, and snippets.

@roderickm
Last active January 1, 2016 05:59
Show Gist options
  • Save roderickm/8102054 to your computer and use it in GitHub Desktop.
Save roderickm/8102054 to your computer and use it in GitHub Desktop.
  1. Plain Strings (207): foo
  2. Anchors (208): k$
  3. Ranges (202): [a-f]{4}
  4. Backrefs (201): (...).*\1
  5. Abba (193): ^(?!.*(.)(.)\2\1)
  6. A man, a plan (176): ^(.)(.).*\2\1$
  7. Prime (286): ^(?!(..+)\1+$)
  8. Four (199): (.)(.\1){3}
  9. Order (198): ^[^o].....?$
  10. Triples (589): ^[378][12479]|00($|[369]|1[25])|55|2[347]
  11. Glob (397): ai|c$|^p|[bcnrw][bnopr]
  12. Balance (286): ^(<(<(<(<(<(<<>>)*>)*>)*>)*>)*>)*$
  13. Powers (80): ^(x|(xx){1,9}|x{32}|(x{64})+)$

Total Score: 3222

Did the first five myself, then collected the best answers I could find from others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment