Skip to content

Instantly share code, notes, and snippets.

@jkup
Last active October 5, 2015 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkup/0ae2a7756cf7f38087b0 to your computer and use it in GitHub Desktop.
Save jkup/0ae2a7756cf7f38087b0 to your computer and use it in GitHub Desktop.
JavaScript multiline string regex
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