Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nitayneeman/d243d0a55fd94b47992b5cbe1aadd7fe to your computer and use it in GitHub Desktop.
Save nitayneeman/d243d0a55fd94b47992b5cbe1aadd7fe to your computer and use it in GitHub Desktop.
const regex = /t(e)(st(\d?))/g;
const result = 'test1test2'.matchAll(regex);
for (const matchingValue of result) {
console.log(matchingValue);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment