Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/stdlib/regexp.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ r.lastIndex = 4;
r.test(s) // false

r.lastIndex // 0
r.test(s)
r.test(s) // true
```

上面代码指定从字符串的第五个位置开始搜索,这个位置为空,所以返回`false`。同时,`lastIndex`属性重置为`0`,所以第二次执行`r.test(s)`会返回`true`
Expand Down