Skip to content

Instantly share code, notes, and snippets.

@deholic
Created September 24, 2012 04:36
Show Gist options
  • Save deholic/3774202 to your computer and use it in GitHub Desktop.
Save deholic/3774202 to your computer and use it in GitHub Desktop.
Using RegExp.Test()
var stringForCheck = "hello", patternRegExp = /[0-9][a-z]/;
var isCorrect = (new RegExp(stringForRegExp)).test(stringForCheck);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment