Last active
October 5, 2015 01:11
-
-
Save jkup/0ae2a7756cf7f38087b0 to your computer and use it in GitHub Desktop.
JavaScript multiline string regex
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 string = "www.one \ | |
www.two \ | |
www.three"; | |
var pattern = /^(www\.)\w+/gm; | |
console.log(string.match(pattern)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment