Skip to content

Instantly share code, notes, and snippets.

@bensonk
Created January 31, 2011 04:12
Show Gist options
  • Select an option

  • Save bensonk/803632 to your computer and use it in GitHub Desktop.

Select an option

Save bensonk/803632 to your computer and use it in GitHub Desktop.
Regular Expression Example
var stuff = "p> This is some text";
console.log("line: ", stuff);
var re = /p([<>]) (.*)/;
var items = re.exec(stuff);
console.log(items[1]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment