Created
August 10, 2016 20:36
-
-
Save pimbrouwers/77ed9f42cea4ad932f2a15abd97b0db3 to your computer and use it in GitHub Desktop.
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 re = /^[a-z ,.'-]{2}+$/i; | |
var str = ' '; | |
var m; | |
if ((m = re.exec(str)) !== null) { | |
if (m.index === re.lastIndex) { | |
re.lastIndex++; | |
} | |
// View your result using the m-variable. | |
// eg m[0] etc. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment