Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nitayneeman/c69ad6c50704910ed604746843ab5c19 to your computer and use it in GitHub Desktop.
Save nitayneeman/c69ad6c50704910ed604746843ab5c19 to your computer and use it in GitHub Desktop.
const regex = /t(e)(st(\d?))/;
const result = 'test1test2'.match(regex);
console.log(result); // ['test1', 'e', 'st1', '1', index: 0, input: "test1test2", groups: undefined]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment