Greedy and lazy quantifiers by SamGreenberg · Pull Request #450 · javascript-tutorial/uk.javascript.info
Repository navigation
Greedy and lazy quantifiers - #450
Merged
dolgachio merged 7 commits into javascript-tutorial:master from SamGreenberg:greedy-and-lazy-quantifiers Aug 22, 2023
Merged
Greedy and lazy quantifiers #450 dolgachio merged 7 commits into javascript-tutorial:master from SamGreenberg:greedy-and-lazy-quantifiers
Conversation
SamGreenberg commented Jan 26, 2023
Copy link Copy Markdown
Contributor
No description provided.
SamGreenberg added 2 commits January 22, 2023 19:06
Methods of RegExp and String
759176b
Greedy and lazy quantifiers
a536fb4
javascript-translate-bot
added
the
review needed
label
Jan 26, 2023
SamGreenberg
marked this pull request as draft
January 26, 2023 20:46
dolgachio
self-requested a review
June 5, 2023 10:37
dolgachio
added
the
in progress
Translation in progress
label
Jun 5, 2023
dolgachio commented Aug 7, 2023
Copy link Copy Markdown
Collaborator
|
@SamGreenberg Підкажіть будь ласка, чи актуальний статус |
Merge branch 'master' into greedy-and-lazy-quantifiers
b8c9a35
SamGreenberg
marked this pull request as ready for review
August 14, 2023 14:38
SamGreenberg
changed the title
Draft: Greedy and lazy quantifiers
Greedy and lazy quantifiers
Aug 14, 2023
SamGreenberg commented Aug 14, 2023
Copy link Copy Markdown
Contributor
Author
|
@stas-dolgachov draft більше не актуальний |
Merge branch 'master' into greedy-and-lazy-quantifiers
3ecf4d0
dolgachio
approved these changes
Aug 22, 2023
View reviewed changes
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/10-regexp-greedy-and-lazy/article.mdOutdated
| : Включається знаком питання `pattern:?` після квантифікатору. Рушій намагається знайти збіг решти патерну перед кожним повторенням квантифікованого символу . | ||
|
|
||
| As we've seen, the lazy mode is not a "panacea" from the greedy search. An alternative is a "fine-tuned" greedy search, with exclusions, as in the pattern `pattern:"[^"]+"`. | ||
| Як бачимо, лінивий режим не є "панацеєю" від жадібного пошуку. Як альтернативу розглядають "добре налаштований" жадібний пошук, з виключенням, як в патерні `pattern:"[^"]+"`. |
Outdated
| 2. Then it looks for `pattern:.*?`: takes one character (lazily !), check if there's a match for `pattern:" class="doc">` ( none ). | ||
| 3. Then takes another character into `pattern:.*?`, and so on ... until it finally reaches `match:" class="doc">`. | ||
| 1. Спочатку, регулярний вираз знаходить початок посилання `match:<a href="`. | ||
| 2. Далі, він шукає `pattern:.*?`: бере один символ (ліниво !), перевіряє наявність збігу для `pattern:" class="doc">` ( нема ). |
Outdated
| Lazy | ||
| : Enabled by the question mark `pattern:?` after the quantifier. The regexp engine tries to match the rest of the pattern before each repetition of the quantified character . | ||
| Лінивий | ||
| : Включається знаком питання `pattern:?` після квантифікатору. Рушій намагається знайти збіг решти патерну перед кожним повторенням квантифікованого символу . |
Apply suggestions from code review
60c0824
Apply suggestions from code review
fa8e2d8
Apply suggestions from code review
42f8dcc
dolgachio
merged commit 50370dd
into
javascript-tutorial : master
Aug 22, 2023
javascript-translate-bot commented Aug 22, 2023
Copy link Copy Markdown
Contributor
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |