Skip to content

Instantly share code, notes, and snippets.

@martinwairegi
Created March 27, 2023 05:34
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 martinwairegi/cd4fe42a070686d45ca01185ae589548 to your computer and use it in GitHub Desktop.
Save martinwairegi/cd4fe42a070686d45ca01185ae589548 to your computer and use it in GitHub Desktop.
const regex = new RegExp(this.regex);
const str = "hello";
const match = regex.test(str);
console.log(match); // true or false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment