Lookahead and lookbehind by MrsMelnychenko · Pull Request #439 · javascript-tutorial/uk.javascript.info
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Дякую, за ваш внесок! Вибачаюсь, що так довго перевіряв.
Я сам внесу всі необхідні зміни і прийму ваш пулл реквест
| Пам'ятайте, `str.match` (без флажку `pattern:g`) і `str.matchAll` (всі) повертає співпадіння у вигляді масиву з властивістю `індекс`, тож ми точно знаємо де саме в тексті вони знаходяться і можемо перевірити контекст. | ||
|
|
||
| But generally lookaround is more convenient. | ||
| Але загалом перегляд уперед і назад більш підходящі. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Але загалом перегляд уперед і назад більш підходящі. | |
| Але загалом перевірка уперед і назад більш підходящі. |
| | `X(?!Y)` | Negative lookahead | `pattern:X` if not followed by `pattern:Y` | | ||
| | `(?<=Y)X` | Positive lookbehind | `pattern:X` if after `pattern:Y` | | ||
| | `(?<!Y)X` | Negative lookbehind | `pattern:X` if not after `pattern:Y` | | ||
| | `X(?=Y)` | Позитивний перегляд уперед | `pattern:X` якщо за ним йде `pattern:Y` | |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | `X(?=Y)` | Позитивний перегляд уперед | `pattern:X` якщо за ним йде `pattern:Y` | | |
| | `X(?=Y)` | Позитивна перевірка уперед | `pattern:X` якщо за ним йде `pattern:Y` | |
| | `(?<=Y)X` | Positive lookbehind | `pattern:X` if after `pattern:Y` | | ||
| | `(?<!Y)X` | Negative lookbehind | `pattern:X` if not after `pattern:Y` | | ||
| | `X(?=Y)` | Позитивний перегляд уперед | `pattern:X` якщо за ним йде `pattern:Y` | | ||
| | `X(?!Y)` | Негативний перегляд уперед | `pattern:X` якщо за ним не йде `pattern:Y` | |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | `X(?!Y)` | Негативний перегляд уперед | `pattern:X` якщо за ним не йде `pattern:Y` | | |
| | `X(?!Y)` | Негативна перевірка уперед | `pattern:X` якщо за ним не йде `pattern:Y` | |
| | `(?<!Y)X` | Negative lookbehind | `pattern:X` if not after `pattern:Y` | | ||
| | `X(?=Y)` | Позитивний перегляд уперед | `pattern:X` якщо за ним йде `pattern:Y` | | ||
| | `X(?!Y)` | Негативний перегляд уперед | `pattern:X` якщо за ним не йде `pattern:Y` | | ||
| | `(?<=Y)X` | Позитивний перегляд назад | `pattern:X` якщо він йде після `pattern:Y` | |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | `(?<=Y)X` | Позитивний перегляд назад | `pattern:X` якщо він йде після `pattern:Y` | | |
| | `(?<=Y)X` | Позитивна перевірка назад | `pattern:X` якщо він йде після `pattern:Y` | |
| | `X(?=Y)` | Позитивний перегляд уперед | `pattern:X` якщо за ним йде `pattern:Y` | | ||
| | `X(?!Y)` | Негативний перегляд уперед | `pattern:X` якщо за ним не йде `pattern:Y` | | ||
| | `(?<=Y)X` | Позитивний перегляд назад | `pattern:X` якщо він йде після `pattern:Y` | | ||
| | `(?<!Y)X` | Негативний перегляд назад | `pattern:X` якщо тільки він не йде після `pattern:Y` | |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | `(?<!Y)X` | Негативний перегляд назад | `pattern:X` якщо тільки він не йде після `pattern:Y` | | |
| | `(?<!Y)X` | Негативна перевірка назад | `pattern:X` якщо тільки він не йде після `pattern:Y` | |
Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉
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