Skip to content

fix: 2 stray lines of russian and a typo #1796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2020
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
6 changes: 3 additions & 3 deletions 9-regular-expressions/11-regexp-groups/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ let results = '<h1> <h2>'.matchAll(/<(.*?)>/gi);

for(let result of results) {
alert(result);
// первый вывод: <h1>,h1
// второй: <h2>,h2
// first alert: <h1>,h1
// second: <h2>,h2
}
```

Expand Down Expand Up @@ -249,7 +249,7 @@ The call to `matchAll` does not perform the search. Instead, it returns an itera

So, there will be found as many results as needed, not more.

E.g. there are potentially 100 matches in the text, but in a `for..of` loop we found 5 of them, then decided it's enough and make a `break`. Then the engine won't spend time finding other 95 mathces.
E.g. there are potentially 100 matches in the text, but in a `for..of` loop we found 5 of them, then decided it's enough and make a `break`. Then the engine won't spend time finding other 95 matches.
```

## Named groups
Expand Down