Skip to content

Capturing groups - #441

Merged
dolgachio merged 2 commits into
javascript-tutorial:masterfrom
SamGreenberg:capturing-groups
Mar 25, 2023
Merged

Capturing groups#441
dolgachio merged 2 commits into
javascript-tutorial:masterfrom
SamGreenberg:capturing-groups

Conversation

@SamGreenberg

Copy link
Copy Markdown
Contributor

No description provided.

@dolgachio dolgachio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дякую за переклад і ваш внесок! Я додав кілька коментарів до тексту, з вашого боку нічого більше не треба, я сам внесу необхідні зміни

Comment thread 9-regular-expressions/11-regexp-groups/01-test-mac/solution.md Outdated
Comment thread 9-regular-expressions/11-regexp-groups/01-test-mac/solution.md Outdated
Comment thread 9-regular-expressions/11-regexp-groups/01-test-mac/task.md Outdated
Comment thread 9-regular-expressions/11-regexp-groups/02-find-webcolor-3-or-6/solution.md Outdated
Comment thread 9-regular-expressions/11-regexp-groups/02-find-webcolor-3-or-6/solution.md Outdated

```js run
let str = "Gogogo John!";
let str = "Gogogo Іван!";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let str = "Gogogo Іван!";
let str = "Gogogo John!";
alert( result[0] ); // Gogogo John (full match)
alert( result[1] ); // John
alert( result.length ); // 2 (no more items in the array)
alert( result[0] ); // Gogogo Іван (повний збіг)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
alert( result[0] ); // Gogogo Іван (повний збіг)
alert( result[0] ); // Gogogo John (повний збіг)
alert( result[1] ); // John
alert( result.length ); // 2 (no more items in the array)
alert( result[0] ); // Gogogo Іван (повний збіг)
alert( result[1] ); // Іван

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
alert( result[1] ); // Іван
alert( result[1] ); // John
alert( result.length ); // 2 (no more items in the array)
alert( result[0] ); // Gogogo Іван (повний збіг)
alert( result[1] ); // Іван
alert( result.length ); // 2 (інших елементів у масиві нема)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
alert( result.length ); // 2 (інших елементів у масиві нема)
alert( result.length ); // 2 (інших елементів у масиві немає)

- The method `str.match` returns capturing groups only without flag `pattern:g`.
- The method `str.matchAll` always returns capturing groups.
- Метод `str.match` повертає групи захоплення лише без прапору `pattern:g`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Метод `str.match` повертає групи захоплення лише без прапору `pattern:g`.
- Метод `str.match` повертає групи захоплення лише без прапорцю `pattern:g`.
@javascript-translate-bot

Copy link
Copy Markdown
Contributor

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@dolgachio

Copy link
Copy Markdown
Collaborator

@all-contributors add @SamGreenberg for translation

@allcontributors

Copy link
Copy Markdown
Contributor

@stas-dolgachov

@SamGreenberg already contributed before to translation

@dolgachio
dolgachio merged commit 0dc4838 into javascript-tutorial:master Mar 25, 2023
@javascript-translate-bot

Copy link
Copy Markdown
Contributor

Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants