Last active
January 1, 2016 02:39
-
-
Save clux/8080678 to your computer and use it in GitHub Desktop.
regex golf - http://regex.alf.nu/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var r1 = /foo/ // 207 | |
, r2 = /k$/ // 208 | |
, r3 = /^[a-f]*$/ // 202 | |
, r4 = /.(..).*\1/ // 201 | |
, r5 = /^(?!.*(.)(.)\2\1)/ // 193 | |
, r6 = /^(.)[^p].*\1$/ // 177 | |
, r7 = /^(?!(xx+)\1+$)/ // 286 | |
, r8 = /(.)(.\1){3}/ // 199 | |
, r9 = /^.{5}[^e]?$/ // 199 | |
, r10 = /^[378][12479]|00($|[369]|1[25])|55|2[347]/ // 589 | |
, r11 = /ai|c$|^p|[bcnrw][bnopr]/ // 397 | |
, r12 = /^(<(<(<(..)*>)*>)*>)*$/ // 288 | |
, r13 = /^(?!(.(..)+)\1*$)/ // 93 | |
; | |
// 3239 total | |
// https://gist.github.com/jonathanmorley/8058871 - for more |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment