1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 10:22:23 +00:00

Merge pull request #962 from linmii/patch-1

修复表述错误
This commit is contained in:
Ruan YiFeng 2020-03-23 19:59:59 +08:00 committed by GitHub
commit 491f6f04cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -649,7 +649,7 @@ result.indices.groups // { Z: [ 4, 6 ] }
上面例子中,`exec()`方法返回结果的`indices.groups`属性是一个对象,提供具名组匹配`Z`的开始位置和结束位置。
如果如何获取成功组匹配,`indices`属性数组的对应成员则为`undefined``indices.groups`属性对象的对应成员也是`undefined`
如果获取组匹配不成功`indices`属性数组的对应成员则为`undefined``indices.groups`属性对象的对应成员也是`undefined`
```javascript
const text = 'zabbcdef';