Skip to content

Instantly share code, notes, and snippets.

@zemlanin
Last active August 8, 2016 06:54
Show Gist options
  • Save zemlanin/9622288 to your computer and use it in GitHub Desktop.
Save zemlanin/9622288 to your computer and use it in GitHub Desktop.
regex.alf.nu

Solutions for regex.alf.nu (easy mode)

  1. Warmup (207)

     foo
    
  2. Anchors (208)

     k$
    
  3. Ranges (202)

     ^[a-f]*$
    
  4. Backrefs (201)

     (...).*\1
    
  5. Abba (165)

     ^(a[cem]|bar|ca|di|ef|go|[fnvpr]|su|tr?a|unv)
    
  6. A man, a plan (177)

     ^(.)[^p].*\1$
    
  7. Prime (282)

     ^(?!((xx+)\2+|x)$)
    
  8. Four (199)

     (.)(.\1){3}
    
  9. Order (191)

     ^[a-m][c-o].*[^ed]$
    
  10. Triples (587)

    90.5|24|5[45]|191|9.7|177|00($|[369]|1[25])
    
  11. Glob (386)

    rr|^(p|do|[bclmwr][^ab]|\*[ifptv])
    
  12. Balance (446)

    ^(<(<(<(<(<(<.*>)*>)*>)*>)*>)*>)*$
    
  13. Powers (93)

    ^(?!(x(xx)+)\1*$)
    
  14. Long count (219)

    ^0+ 0+1 .*0011 0100 0101 0110 01+ 10+ 1001 1010 101
    
  15. Alphabetical (289)

    e a?e|rt r|nt st|et te|st s|s ren|ee ta|a sea|r tea
    
  16. Powers 2 (88)

    ^(?!(x(xxx)+|xx|)\1*$)
    

Score 3940

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