Skip to content

Instantly share code, notes, and snippets.

@jasonsemko
Created July 11, 2013 04:20
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 jasonsemko/5972508 to your computer and use it in GitHub Desktop.
Save jasonsemko/5972508 to your computer and use it in GitHub Desktop.
//The different between the two is the ^ and $...I'd assume the entire string is evaluated as one but this doesn't seem to be the case.
//Why does this alert true?...if there anything not a-z I expected a false
alert(/[A-z]*/gm.test("Hell7o"));
//This is what I expected from the above
alert(/^[A-z]*$/gm.test("Hell7o"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment