Last active
August 24, 2022 08:34
-
-
Save kurt-liao/e1d768a7a6a3742bfd82066ad29077b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const str = 'bbabcddd' | |
const regex = /(abc)/gd; | |
const matched = regex.exec(str); | |
console.log(matched); | |
// [ | |
// "abc", | |
// "abc", | |
// groups: undefined, | |
// index: 2, | |
// indices: [ | |
// [2, 5], | |
// [2, 5], | |
// groups: undefined | |
// ], | |
// input: "bbabcddd" | |
// ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment