Skip to content

Instantly share code, notes, and snippets.

@cecyurbina
Created February 28, 2014 03: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 cecyurbina/9264442 to your computer and use it in GitHub Desktop.
Save cecyurbina/9264442 to your computer and use it in GitHub Desktop.
var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var regexp = /[A-E]/gi;
var matches_array = str.match(regexp);
console.log(matches_array);
// ['A', 'B', 'C', 'D', 'E', 'a', 'b', 'c', 'd', 'e']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment