Skip to content

Instantly share code, notes, and snippets.

@wusuopubupt
Forked from jpsim/answers.md
Created December 23, 2013 08:19
Show Gist options
  • Select an option

  • Save wusuopubupt/8093401 to your computer and use it in GitHub Desktop.

Select an option

Save wusuopubupt/8093401 to your computer and use it in GitHub Desktop.
  1. Plain Strings (201): \w*foo\w*
  2. Anchors (208): k$
  3. Ranges (202): ^[a-f]*$
  4. Backrefs (196): ((\w){3})\w*\1
  5. Abba (169): ^(.(?!(ll|ss|mm|rr|tt|ff|cc|bb)))*$|^n|ef
  6. A man, a plan (162): (.)(.)(.){0,1}\2\1
  7. Prime (184): ^(x{2,3}|x{5}|x{7}|x{11}|x{13}|x{17}|x{19}|x{23}|x{29}|x{31}|x{37}|x{41}|x{43}|x{47}|x{53}|x{59}|x{61}|x{67}|x{71})$
  8. Four (161): (\w*a){4}|(\w*e){4}|(\w*i){4}|(\w*o){4}
  9. Order (186): ^[a-m][c-o][^ad]\w*[^d]$
  10. Triples (507): (^39|^44)|(^([0369]|([147][0369]*[258])|(([258]|[147][0369]*[147])([0369]*|[258][0369]*[147])([147]|[258][0369]*[258])))*$)
  11. Glob (364): ^((\*(er|f|i|p|t|v))|(b|c(h|o|r)|do|l|mi|p(a|r|u)|re|w))
  12. Balance (220): ^<{2,5}>|^(<>){0,2}$
  13. Powers (43): ^(x{1,2}|x{4}|x{8}|x{16}|x{32}|x{64}|x{128}|x{256}|x{512}|x{1024})$

Total Score: 2803

@wusuopubupt
Copy link
Author

@wusuopubupt
Copy link
Author

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