GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Greedy and lazy quantifiers by SamGreenberg · Pull Request #450 · javascript-tutorial/uk.javascript.info

Conversation

@SamGreenberg

@SamGreenberg SamGreenberg commented Jan 26, 2023

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
SamGreenberg added 2 commits January 22, 2023 19:06
@SamGreenberg
Methods of RegExp and String
759176b
@SamGreenberg
Greedy and lazy quantifiers
a536fb4
@javascript-translate-bot javascript-translate-bot added the review needed label Jan 26, 2023
@SamGreenberg
SamGreenberg marked this pull request as draft January 26, 2023 20:46
@dolgachio
dolgachio self-requested a review June 5, 2023 10:37
@dolgachio dolgachio added the in progress Translation in progress label Jun 5, 2023
@dolgachio

dolgachio commented Aug 7, 2023

Copy link
Copy Markdown
Collaborator

@SamGreenberg Підкажіть будь ласка, чи актуальний статус Draft для цього пулл реквеста?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dolgachio dolgachio removed the in progress Translation in progress label Aug 7, 2023
@SamGreenberg
Merge branch 'master' into greedy-and-lazy-quantifiers
b8c9a35
@SamGreenberg
SamGreenberg marked this pull request as ready for review August 14, 2023 14:38
@SamGreenberg SamGreenberg changed the title Draft: Greedy and lazy quantifiers Greedy and lazy quantifiers Aug 14, 2023
@SamGreenberg

SamGreenberg commented Aug 14, 2023

Copy link
Copy Markdown
Contributor Author

@stas-dolgachov draft більше не актуальний

dolgachio reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dolgachio
Merge branch 'master' into greedy-and-lazy-quantifiers
3ecf4d0
dolgachio
dolgachio approved these changes Aug 22, 2023
View reviewed changes

@dolgachio dolgachio left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/1-lazy-greedy/solution.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/3-find-html-comments/solution.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/3-find-html-comments/solution.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/article.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/article.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/article.md Outdated
: Включається знаком питання `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:"[^"]+"`.

@dolgachio dolgachio Aug 21, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
Як бачимо, лінивий режим не є "панацеєю" від жадібного пошуку. Як альтернативу розглядають "добре налаштований" жадібний пошук, з виключенням, як в патерні `pattern:"[^"]+"`.
Як бачимо, лінивий режим не є "панацеєю" від жадібного пошуку. Як альтернативу розглядають "добре налаштований" жадібний пошук, з виключенням, як в шаблоні `pattern:"[^"]+"`.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/article.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/article.md 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">` (нема).

@dolgachio dolgachio Aug 21, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
2. Далі, він шукає `pattern:.*?`: бере один символ (ліниво!), перевіряє наявність збігу для `pattern:" class="doc">` (нема).
2. Далі, він шукає `pattern:.*?`: бере один символ (ліниво!), перевіряє наявність збігу для `pattern:" class="doc">` (немає).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/article.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread 9-regular-expressions/10-regexp-greedy-and-lazy/article.md 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:?` після квантифікатору. Рушій намагається знайти збіг решти патерну перед кожним повторенням квантифікованого символу.

@dolgachio dolgachio Aug 21, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
: Включається знаком питання `pattern:?` після квантифікатору. Рушій намагається знайти збіг решти патерну перед кожним повторенням квантифікованого символу.
: Включається знаком питання `pattern:?` після квантифікатору. Рушій намагається знайти збіг решти шаблону перед кожним повторенням квантифікованого символу.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@javascript-translate-bot javascript-translate-bot added needs +1 and removed review needed labels Aug 22, 2023
dolgachio added 3 commits August 22, 2023 12:50
@dolgachio
Apply suggestions from code review
60c0824
@dolgachio
Apply suggestions from code review
fa8e2d8
@dolgachio
Apply suggestions from code review
42f8dcc
@dolgachio
dolgachio merged commit 50370dd into javascript-tutorial:master Aug 22, 2023
@javascript-translate-bot

javascript-translate-bot commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@javascript-translate-bot javascript-translate-bot mentioned this pull request Aug 22, 2023
Ukrainian Translation Progress #1
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dolgachio dolgachio dolgachio approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs +1

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@SamGreenberg @dolgachio @javascript-translate-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.