Skip to content

Instantly share code, notes, and snippets.

@jonathanmorley
Forked from jpsim/answers.md
Last active March 1, 2025 13:14
Show Gist options
  • Save jonathanmorley/8058871 to your computer and use it in GitHub Desktop.
Save jonathanmorley/8058871 to your computer and use it in GitHub Desktop.

Revisions

  1. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -49,4 +49,5 @@ Long count | 239 | `^((?=(\S*)0).{4} (?=\2[1]))+1+$` | Davide
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
    Total | 3664
    Subtraction | 180 | `^(.+)(.+) - \1 = \2$` | jonathanmorley (GH)
    Subtraction | 180 | `^(.+)(.+) - \1 = \2$` | jonathanmorley (GH)
    Typist | 180 | `^[adresbtcfxzgvwq]+$` | jonathanmorley (GH)
  2. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,7 @@ Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | alexan
    Powers 2 | 88 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
    Total | 4075
    Subtraction | 180 | `^(.+)(.+) - \1 = \2$` | jonathanmorley (GH)
    Typist | 181 | `^[adresbtcfxzgvw]+$` | jonathanmorley (GH)

    Hard Mode
    =========
  3. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,7 @@ Long count | 256 | `((.+)0\2+1){8}` | Davide
    Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | alexandrosm (GH)
    Powers 2 | 88 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
    Total | 4075
    Subtraction | 180 | `^(.+)(.+) - \1 = \2$` | jonathanmorley (GH)

    Hard Mode
    =========
    @@ -46,4 +47,5 @@ Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (
    Long count | 239 | `^((?=(\S*)0).{4} (?=\2[1]))+1+$` | Davidebyzero (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
    Total | 3664
    Total | 3664
    Subtraction | 180 | `^(.+)(.+) - \1 = \2$` | jonathanmorley (GH)
  4. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -45,4 +45,5 @@ Balance | 443 | `^(<(<(<(<(<(<(<>)*>)*>)*>)*>)*>)*>)*$` | gkucmi
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 239 | `^((?=(\S*)0).{4} (?=\2[1]))+1+$` | Davidebyzero (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
    Total | 3664
  5. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -24,6 +24,7 @@ Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (
    Long count | 256 | `((.+)0\2+1){8}` | Davidebyzero (GH)
    Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | alexandrosm (GH)
    Powers 2 | 88 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
    Total | 4075

    Hard Mode
    =========
  6. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ Four | 199 | `(.)(.\1){3}` | chrism
    Order | 199 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 596 | <code>00($&#124;3&#124;6&#124;9&#124;12&#124;15)&#124;4.2&#124;.1.+4&#124;55&#124;.17</code>| alexandrosm (GH)
    Glob | 397 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 452 | <code>^$&#124;.{37}&#124;^<(.(?!><&#42;.>$).)&#42;>$</code>| Davidebyzero (GH)
    Balance | 454 | <code>.{37}&#124;^(<(..(?!<.>$))&#42;>)&#42;$</code>| Davidebyzero (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 256 | `((.+)0\2+1){8}` | Davidebyzero (GH)
    Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | alexandrosm (GH)
  7. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,11 @@
    See Also:

    * [HN Post](https://news.ycombinator.com/item?id=6941231)
    * [Regex Golf Answers (Gist)](https://gist.github.com/jpsim/8057500)
    * [Best known Regex Golf solutions (Gist)](https://gist.github.com/Davidebyzero/9221685)
    * [Regex Golf (reddit)](http://www.reddit.com/r/programming/comments/1tb0go/regex_golf/)

    Normal
    ======

    Level |Score| Regex | Credit
    ------------ |:---:| -------------------------------------------------- | ------
    Warmup | 207 | `foo` |
    @@ -29,7 +27,6 @@ Powers 2 | 88 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc

    Hard Mode
    =========

    Level |Score| Regex | Credit
    ------------ |:---:| -------------------------------------------------- | ------
    Warmup | 207 | `foo` |
  8. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    See Also:

    [HN Post](https://news.ycombinator.com/item?id=6941231)
    [Regex Golf Answers (Gist)](https://gist.github.com/jpsim/8057500)
    [Best known Regex Golf solutions (Gist)](https://gist.github.com/Davidebyzero/9221685)
    [Regex Golf (reddit)](http://www.reddit.com/r/programming/comments/1tb0go/regex_golf/)
    * [HN Post](https://news.ycombinator.com/item?id=6941231)
    * [Regex Golf Answers (Gist)](https://gist.github.com/jpsim/8057500)
    * [Best known Regex Golf solutions (Gist)](https://gist.github.com/Davidebyzero/9221685)
    * [Regex Golf (reddit)](http://www.reddit.com/r/programming/comments/1tb0go/regex_golf/)

    Normal
    ======
  9. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ See Also:

    [HN Post](https://news.ycombinator.com/item?id=6941231)
    [Regex Golf Answers (Gist)](https://gist.github.com/jpsim/8057500)
    [Best known Regex Golf solutions (Gist)](https://gist.github.com/Davidebyzero/9221685)
    [Best known Regex Golf solutions (Gist)](https://gist.github.com/Davidebyzero/9221685)
    [Regex Golf (reddit)](http://www.reddit.com/r/programming/comments/1tb0go/regex_golf/)

    Normal
  10. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    See Also:

    [HN Post](https://news.ycombinator.com/item?id=6941231)
    [Regex Golf Answers (Gist)](https://gist.github.com/jpsim/8057500)
    [HN Post](https://news.ycombinator.com/item?id=6941231)
    [Regex Golf Answers (Gist)](https://gist.github.com/jpsim/8057500)
    [Best known Regex Golf solutions (Gist)](https://gist.github.com/Davidebyzero/9221685)
    [Regex Golf (reddit)](http://www.reddit.com/r/programming/comments/1tb0go/regex_golf/)

  11. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,10 @@
    See Also:

    [HN Post](https://news.ycombinator.com/item?id=6941231)
    [Regex Golf Answers (Gist)](https://gist.github.com/jpsim/8057500)
    [Best known Regex Golf solutions (Gist)](https://gist.github.com/Davidebyzero/9221685)
    [Regex Golf (reddit)](http://www.reddit.com/r/programming/comments/1tb0go/regex_golf/)

    Normal
    ======

  12. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,6 @@ Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 443 | `^(<(<(<(<(<(<(<>)*>)*>)*>)*>)*>)*>)*$` | gkucmierz (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 235 | `^((?=(\S*)0).{4} (?=\2[1])){15}\2.$` | teukon (GH)
    Long count | 239 | `^((?=(\S*)0).{4} (?=\2[1]))+1+$` | Davidebyzero (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
  13. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -36,7 +36,7 @@ Four | 199 | `(.)(.\1){3}` | chrism
    Order | 156 | `^a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*$`| Davidebyzero (GH)
    Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))(?=((.&#42;?[258]){3})&#42;((.&#42;?[258]&#124;){2}))^.*$(\3\7&#124;(?!\3&#124;\7)\4\8&#124;(?!\4&#124;\8))</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 352 | <code>^$&#124;.{37}&#124;^<(.(?!><&#42;.>$).)&#42;>$</code>| Davidebyzero (GH)
    Balance | 443 | `^(<(<(<(<(<(<(<>)*>)*>)*>)*>)*>)*>)*$` | gkucmierz (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 235 | `^((?=(\S*)0).{4} (?=\2[1])){15}\2.$` | teukon (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
  14. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ Abba | 193 | `^(?!.*(.)(.)\2\1)` | chingj
    A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | jonathanmorley (GH)
    Prime | 284 | `^(?!(xx+)\1+$)xx` | Davidebyzero (GH)
    Four | 199 | `(.)(.\1){3}` | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | ekke (HN)
    Order | 156 | `^a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*$`| Davidebyzero (GH)
    Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))(?=((.&#42;?[258]){3})&#42;((.&#42;?[258]&#124;){2}))^.*$(\3\7&#124;(?!\3&#124;\7)\4\8&#124;(?!\4&#124;\8))</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 352 | <code>^$&#124;.{37}&#124;^<(.(?!><&#42;.>$).)&#42;>$</code>| Davidebyzero (GH)
  15. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ Ranges | 202 | `^[a-f]*$` |
    Backrefs | 201 | `(...).*\1` | gorhill (HN)
    Abba | 193 | `^(?!.*(.)(.)\2\1)` | chingjun (HN) / josephlord (HN)
    A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | jonathanmorley (GH)
    Prime | 283 | <code>^(?!.$&#124;(..+)\1+$)</code> | josephlord (HN) / jonathanmorley (GH)
    Prime | 284 | `^(?!(xx+)\1+$)xx` | Davidebyzero (GH)
    Four | 199 | `(.)(.\1){3}` | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))(?=((.&#42;?[258]){3})&#42;((.&#42;?[258]&#124;){2}))^.*$(\3\7&#124;(?!\3&#124;\7)\4\8&#124;(?!\4&#124;\8))</code> | teukon (GH)
  16. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,7 @@ Hard Mode
    Level |Score| Regex | Credit
    ------------ |:---:| -------------------------------------------------- | ------
    Warmup | 207 | `foo` |
    Anchors | 108 | `k$` |
    Anchors | 206 | `ick$` | Davidebyzero (GH)
    Ranges | 202 | `^[a-f]*$` |
    Backrefs | 201 | `(...).*\1` | gorhill (HN)
    Abba | 193 | `^(?!.*(.)(.)\2\1)` | chingjun (HN) / josephlord (HN)
  17. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ Triples | 596 | <code>00($&#124;3&#124;6&#124;9&#124;12&#124;15)&#124;4.2&#
    Glob | 397 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 452 | <code>^$&#124;.{37}&#124;^<(.(?!><&#42;.>$).)&#42;>$</code>| Davidebyzero (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 254 | `((.+)0 \2?1 ){7}` | senegrom (GH)
    Long count | 256 | `((.+)0\2+1){8}` | Davidebyzero (GH)
    Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | alexandrosm (GH)
    Powers 2 | 88 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)

  18. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ Four | 199 | `(.)(.\1){3}` | chrism
    Order | 199 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 596 | <code>00($&#124;3&#124;6&#124;9&#124;12&#124;15)&#124;4.2&#124;.1.+4&#124;55&#124;.17</code>| alexandrosm (GH)
    Glob | 397 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 452 | <code>^$&#124;.{37}&#124;^<(.(?!><*.>$).)*>$</code>| Davidebyzero (GH)
    Balance | 452 | <code>^$&#124;.{37}&#124;^<(.(?!><&#42;.>$).)&#42;>$</code>| Davidebyzero (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 254 | `((.+)0 \2?1 ){7}` | senegrom (GH)
    Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | alexandrosm (GH)
    @@ -36,7 +36,7 @@ Four | 199 | `(.)(.\1){3}` | chrism
    Order | 99 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))(?=((.&#42;?[258]){3})&#42;((.&#42;?[258]&#124;){2}))^.*$(\3\7&#124;(?!\3&#124;\7)\4\8&#124;(?!\4&#124;\8))</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 352 | <code>^$&#124;.{37}&#124;^<(.(?!><*.>$).)*>$</code>| Davidebyzero (GH)
    Balance | 352 | <code>^$&#124;.{37}&#124;^<(.(?!><&#42;.>$).)&#42;>$</code>| Davidebyzero (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 235 | `^((?=(\S*)0).{4} (?=\2[1])){15}\2.$` | teukon (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
  19. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ Four | 199 | `(.)(.\1){3}` | chrism
    Order | 199 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 596 | <code>00($&#124;3&#124;6&#124;9&#124;12&#124;15)&#124;4.2&#124;.1.+4&#124;55&#124;.17</code>| alexandrosm (GH)
    Glob | 397 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 336 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Balance | 452 | <code>^$&#124;.{37}&#124;^<(.(?!><*.>$).)*>$</code>| Davidebyzero (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 254 | `((.+)0 \2?1 ){7}` | senegrom (GH)
    Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | alexandrosm (GH)
    @@ -36,7 +36,7 @@ Four | 199 | `(.)(.\1){3}` | chrism
    Order | 99 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))(?=((.&#42;?[258]){3})&#42;((.&#42;?[258]&#124;){2}))^.*$(\3\7&#124;(?!\3&#124;\7)\4\8&#124;(?!\4&#124;\8))</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Balance | 352 | <code>^$&#124;.{37}&#124;^<(.(?!><*.>$).)*>$</code>| Davidebyzero (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 235 | `^((?=(\S*)0).{4} (?=\2[1])){15}\2.$` | teukon (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
  20. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,6 @@ Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 232 | `^(?!.*\S{5})((.*)0(1*) (?=\2[1]+)){15}` | Davidebyzero (GH)
    Long count | 235 | `^((?=(\S*)0).{4} (?=\2[1])){15}\2.$` | teukon (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
  21. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,6 @@ Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 154 | `((.+)0 \2?1 ){7}` | senegrom (GH)
    Long count | 232 | `^(?!.*\S{5})((.*)0(1*) (?=\2[1]+)){15}` | Davidebyzero (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
  22. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | jonath
    Prime | 283 | <code>^(?!.$&#124;(..+)\1+$)</code> | josephlord (HN) / jonathanmorley (GH)
    Four | 199 | `(.)(.\1){3}` | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 523 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))(?=((.&#42;?[258]){3})&#42;((.&#42;?[258]&#124;){2}))^.*$(\3\7&#124;(?!\3&#124;\7)\4\8&#124;(?!\4&#124;\8))</code> | teukon (GH)
    Triples | 524 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))(?=((.&#42;?[258]){3})&#42;((.&#42;?[258]&#124;){2}))^.*$(\3\7&#124;(?!\3&#124;\7)\4\8&#124;(?!\4&#124;\8))</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
  23. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | jonath
    Prime | 283 | <code>^(?!.$&#124;(..+)\1+$)</code> | josephlord (HN) / jonathanmorley (GH)
    Four | 199 | `(.)(.\1){3}` | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 523 | <code>^([0369]&#124;[147][0369]&#42;[258]&#124;([258]&#124;[147][0369]&#42;[147])([0369]&#124;[258][0369]&#42;[147])&#42;([147]&#124;[258][0369]&#42;[258]))*$</code> | teukon (GH)
    Triples | 523 | <code>(?=((.&#42;?[147]){3})&#42;((.&#42;?[147]&#124;){2}))(?=((.&#42;?[258]){3})&#42;((.&#42;?[258]&#124;){2}))^.*$(\3\7&#124;(?!\3&#124;\7)\4\8&#124;(?!\4&#124;\8))</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
  24. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | jonath
    Prime | 283 | <code>^(?!.$&#124;(..+)\1+$)</code> | josephlord (HN) / jonathanmorley (GH)
    Four | 199 | `(.)(.\1){3}` | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 523 | <code>^([0369]&#124;[147][0369]*[258]&#124;([258]&#124;[147][0369]*[147])([0369]&#124;[258][0369]*[147])*([147]&#124;[258][0369]*[258]))*$</code> | teukon (GH)
    Triples | 523 | <code>^([0369]&#124;[147][0369]&#42;[258]&#124;([258]&#124;[147][0369]&#42;[147])([0369]&#124;[258][0369]&#42;[147])&#42;([147]&#124;[258][0369]&#42;[258]))*$</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
  25. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -39,5 +39,5 @@ Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwelln
    Balance | 236 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 154 | `((.+)0 \2?1 ){7}` | senegrom (GH)
    Alphabetical | 217 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Alphabetical | 282 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
  26. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 35 additions and 35 deletions.
    70 changes: 35 additions & 35 deletions regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -1,43 +1,43 @@
    Normal
    ======

    Level |Score| Regex | Length | Credit
    ------------ |:---:| -------------------------------------------------- | ------ | ------
    Warmup | 207 | `foo` | 3 |
    Anchors | 208 | `k$` | 2 |
    Ranges | 202 | `^[a-f]*$` | 8 |
    Backrefs | 201 | `(...).*\1` | 9 | gorhill (HN)
    Abba | 195 | <code>^(?!.*(.)\1)&#124;ef</code> | 15 | BeniaminK (GH)
    A man, a plan| 177 | `^(.)[^p].*\1$` | 13 | hyp0 (HN)
    Prime | 286 | `^(?!(..+)\1+$)` | 14 | josephlord (HN)
    Four | 199 | `(.)(.\1){3}` | 11 | chrismorgan (HN) / MereInterest (HN)
    Order | 199 | `^.{5}[^e]?$` | 11 | ekke (HN)
    Triples | 596 | <code>00($&#124;3&#124;6&#124;9&#124;12&#124;15)&#124;4.2&#124;.1.+4&#124;55&#124;.17</code>| 34 | alexandrosm (GH)
    Glob | 397 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| 23 | nwellnhof (HN)
    Balance | 336 | <code>^<.*>$&#124;^$</code> | 9 | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | 17 | plby (GH)
    Long count | 254 | `((.+)0 \2?1 ){7}` | 16 | senegrom (GH)
    Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | 23 | alexandrosm (GH)
    Powers 2 | 88 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | 22 | muxrwc (GH)
    Level |Score| Regex | Credit
    ------------ |:---:| -------------------------------------------------- | ------
    Warmup | 207 | `foo` |
    Anchors | 208 | `k$` |
    Ranges | 202 | `^[a-f]*$` |
    Backrefs | 201 | `(...).*\1` | gorhill (HN)
    Abba | 195 | <code>^(?!.*(.)\1)&#124;ef</code> | BeniaminK (GH)
    A man, a plan| 177 | `^(.)[^p].*\1$` | hyp0 (HN)
    Prime | 286 | `^(?!(..+)\1+$)` | josephlord (HN)
    Four | 199 | `(.)(.\1){3}` | chrismorgan (HN) / MereInterest (HN)
    Order | 199 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 596 | <code>00($&#124;3&#124;6&#124;9&#124;12&#124;15)&#124;4.2&#124;.1.+4&#124;55&#124;.17</code>| alexandrosm (GH)
    Glob | 397 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 336 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 254 | `((.+)0 \2?1 ){7}` | senegrom (GH)
    Alphabetical | 317 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | alexandrosm (GH)
    Powers 2 | 88 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)

    Hard Mode
    =========

    Level |Score| Regex | Length | Credit
    ------------ |:---:| -------------------------------------------------- | ------ | ------
    Warmup | 207 | `foo` | 3 |
    Anchors | 108 | `k$` | 2 |
    Ranges | 202 | `^[a-f]*$` | 8 |
    Backrefs | 201 | `(...).*\1` | 9 | gorhill (HN)
    Abba | 193 | `^(?!.*(.)(.)\2\1)` | 17 | chingjun (HN) / josephlord (HN)
    A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | 40 | jonathanmorley (GH)
    Prime | 283 | <code>^(?!.$&#124;(..+)\1+$)</code> | 17 | josephlord (HN) / jonathanmorley (GH)
    Four | 199 | `(.)(.\1){3}` | 11 | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | 11 | ekke (HN)
    Level |Score| Regex | Credit
    ------------ |:---:| -------------------------------------------------- | ------
    Warmup | 207 | `foo` |
    Anchors | 108 | `k$` |
    Ranges | 202 | `^[a-f]*$` |
    Backrefs | 201 | `(...).*\1` | gorhill (HN)
    Abba | 193 | `^(?!.*(.)(.)\2\1)` | chingjun (HN) / josephlord (HN)
    A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | jonathanmorley (GH)
    Prime | 283 | <code>^(?!.$&#124;(..+)\1+$)</code> | josephlord (HN) / jonathanmorley (GH)
    Four | 199 | `(.)(.\1){3}` | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | ekke (HN)
    Triples | 523 | <code>^([0369]&#124;[147][0369]*[258]&#124;([258]&#124;[147][0369]*[147])([0369]&#124;[258][0369]*[147])*([147]&#124;[258][0369]*[258]))*$</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| 23 | nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | 9 | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | 17 | plby (GH)
    Long count | 154 | `((.+)0 \2?1 ){7}` | 16 | senegrom (GH)
    Alphabetical | 217 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code> | 58 | teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | 22 | muxrwc (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | plby (GH)
    Long count | 154 | `((.+)0 \2?1 ){7}` | senegrom (GH)
    Alphabetical | 217 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code>| teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | muxrwc (GH)
  27. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -39,5 +39,5 @@ Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| 23
    Balance | 236 | <code>^<.*>$&#124;^$</code> | 9 | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | 17 | plby (GH)
    Long count | 154 | `((.+)0 \2?1 ){7}` | 16 | senegrom (GH)
    Alphabetical | 217 | <code>^(?!.*\b(.*)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code> | 58 | teukon (GH)
    Alphabetical | 217 | <code>^(?!.&#42;\b(.&#42;)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code> | 58 | teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | 22 | muxrwc (GH)
  28. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | 40
    Prime | 283 | <code>^(?!.$&#124;(..+)\1+$)</code> | 17 | josephlord (HN) / jonathanmorley (GH)
    Four | 199 | `(.)(.\1){3}` | 11 | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | 11 | ekke (HN)
    Triples | 496 | <code>00($&#124;3&#124;6&#124;9&#124;12&#124;15)&#124;4.2&#124;.1.+4&#124;55&#124;.17</code>| 34 | alexandrosm (GH)
    Triples | 523 | <code>^([0369]&#124;[147][0369]*[258]&#124;([258]&#124;[147][0369]*[147])([0369]&#124;[258][0369]*[147])*([147]&#124;[258][0369]*[258]))*$</code> | teukon (GH)
    Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| 23 | nwellnhof (HN)
    Balance | 236 | <code>^<.*>$&#124;^$</code> | 9 | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | 17 | plby (GH)
  29. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -39,5 +39,5 @@ Glob | 297 | <code>ai&#124;c$&#124;^p&#124;[bcnrw][bnopr]</code>| 23
    Balance | 236 | <code>^<.*>$&#124;^$</code> | 9 | mattchainsaw (GH)
    Powers | 93 | `^(?!(.(..)+)\1*$)` | 17 | plby (GH)
    Long count | 154 | `((.+)0 \2?1 ){7}` | 16 | senegrom (GH)
    Alphabetical | 217 | <code>.r.{32}r&#124;a.{10}te&#124;n.n..</code> | 23 | alexandrosm (GH)
    Alphabetical | 217 | <code>^(?!.*\b(.*)(e&#124;(n&#124;r&#124;(s&#124;t))).* \1(a&#124;(?!\3)[en]&#124;(?!\4)[rs]))</code> | 58 | teukon (GH)
    Powers 2 | -12 | <code>^(?!((xxx)+x&#124;xx&#124;)\1*$)</code> | 22 | muxrwc (GH)
  30. jonathanmorley revised this gist Feb 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion regex_golf.md
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ Ranges | 202 | `^[a-f]*$` | 8
    Backrefs | 201 | `(...).*\1` | 9 | gorhill (HN)
    Abba | 193 | `^(?!.*(.)(.)\2\1)` | 17 | chingjun (HN) / josephlord (HN)
    A man, a plan| 150 | `^(.?)(.?)(.?)(.?)(.?)(.?).?\6\5\4\3\2\1$` | 40 | jonathanmorley (GH)
    Prime | 186 | `^(?!(..+)\1+$)` | 14 | josephlord (HN)
    Prime | 283 | <code>^(?!.$&#124;(..+)\1+$)</code> | 17 | josephlord (HN) / jonathanmorley (GH)
    Four | 199 | `(.)(.\1){3}` | 11 | chrismorgan (HN) / MereInterest (HN)
    Order | 99 | `^.{5}[^e]?$` | 11 | ekke (HN)
    Triples | 496 | <code>00($&#124;3&#124;6&#124;9&#124;12&#124;15)&#124;4.2&#124;.1.+4&#124;55&#124;.17</code>| 34 | alexandrosm (GH)