Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Alternation (OR) |#388

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dolgachio merged 3 commits intojavascript-tutorial:masterfromvladiuskor:master
Oct 24, 2022
Merged

Conversation

vladiuskor
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commentedSep 17, 2022
edited
Loading

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@dolgachiodolgachio left a comment

Choose a reason for hiding this comment

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

Дякую, за чудовий переклад! Вибачаюсь, що вам довелося так довго чекати :)
Подивіться, будь ласка, мої коментарі і напишіть мені, якщо з чимось не згодні.


Alternation is the term in regular expression that is actually a simple "OR".
Альтернація - це термін у регулярному виразі, який насправді є простим "АБО".
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Альтернація - це термін у регулярному виразі, який насправді є простим "АБО".
Альтернація -- це термін у регулярному виразі, який насправді є простим "АБО".

vladiuskor reacted with thumbs up emoji

- `pattern:gr(a|e)y` means exactly the same as `pattern:gr[ae]y`.
- `pattern:gra|ey` means `match:gra` or `match:ey`.
- `pattern:gr(a|e)y` означає те саме, що і `pattern:gr[ae]y`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
-`pattern:gr(a|e)y` означає те саме, щоі`pattern:gr[ae]y`.
-`pattern:gr(a|e)y` означає те саме, щой`pattern:gr[ae]y`.

vladiuskor reacted with thumbs up emoji
To apply alternation to a chosen part of the pattern, we can enclose it in parentheses:
- `pattern:I love HTML|CSS` matches `match:I love HTML` or `match:CSS`.
- `pattern:I love (HTML|CSS)` matches `match:I love HTML` or `match:I love CSS`.
Для того, щоб використати альтернацію до обраної частини шаблону, ми можемо загорнути його у дужки:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Для того, щоб використати альтернаціюдо обраної частини шаблону, ми можемо загорнути його у дужки:
Для того, щоб використати альтернаціюз обраною частиною шаблону, ми можемо загорнути його у дужки:

vladiuskor reacted with thumbs up emoji

In previous articles there was a task to build a regexp for searching time in the form `hh:mm`,for instance`12:00`.But a simple `pattern:\d\d:\d\d`is too vague. It accepts `25:99`as the time (as99minutes match the pattern, but that time is invalid).
У попередніх главах було завдання написати регулярний вираз для пошуку часу у форматі `гг:хх`,наприклад`12:00`.Однак простий шаблон `pattern:\d\d:\d\d`недостатньо точний. Він приймає `25:99`як час (99хвилин підходять до шаблону, однак цей час не є вірним).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
У попередніхглавах було завдання написати регулярний вираз для пошуку часу у форматі`гг:хх`, наприклад`12:00`. Однак простий шаблон`pattern:\d\d:\d\d` недостатньо точний. Він приймає`25:99` як час (99 хвилин підходять до шаблону, однак цей час не є вірним).
У попередніхстаттях було завдання написати регулярний вираз для пошуку часу у форматі`гг:хх`, наприклад`12:00`. Однак простий шаблон`pattern:\d\d:\d\d` недостатньо точний. Він приймає`25:99` як час (99 хвилин підходять до шаблону, однак цей час не є вірним).

vladiuskor reacted with thumbs up emoji
- (no other first digit is allowed)
-Якщо перша цифра`0`або `1`,тоді наступна може бути будь-якою цифрою: `pattern:[01]\d`.
-В іншому випадку, якщо перша цифра `2`,тоді наступна має бути від 0 до 3 `pattern:[0-3]`.
- (іншої першої цифри не може бути)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- (іншої першої цифри не може бути)
- (іншої першої цифрибутине може)

vladiuskor reacted with thumbs up emoji

```js
let regexp = /your regexp/flags;
let regexp = /ваш регулярний вираз/прапорець;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let regexp = /ваш регулярний вираз/прапорець;
let regexp = /ваш регулярний вираз/прапорці;

vladiuskor reacted with thumbs up emoji

let str = "..[url]http://google.com[/url]..";
alert( str.match(regexp) ); // [url]http://google.com[/url]
```

If tags are nested, then we need the outer tag (if we want we can continue the search in its content):
Якщо теки вкладені, тоді необхідно шукати зовнішній тег (за бажанням, можна продовжити пошук всередині його вмісту):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Якщотеки вкладені, тоді необхідно шукати зовнішній тег (за бажанням, можна продовжити пошук всередині його вмісту):
Якщотеги вкладені, тоді необхідно шукати зовнішній тег (за бажанням, можна продовжити пошук всередині його вмісту):

vladiuskor reacted with thumbs up emoji

```js
let regexp = /your regexp/flags;
let regexp = /ваш регулярний вираз/прапорець;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let regexp = /ваш регулярний вираз/прапорець;
let regexp = /ваш регулярний вираз/прапорці;

vladiuskor reacted with thumbs up emoji
@@ -1,17 +1,17 @@
The solution: `pattern:/"(\\.|[^"\\])*"/g`.
Вирішення: `pattern:/"(\\.|[^"\\])*"/g`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Вирішення:`pattern:/"(\\.|[^"\\])*"/g`.
Рішення:`pattern:/"(\\.|[^"\\])*"/g`.

vladiuskor reacted with thumbs up emoji

That's the essential part of the task, otherwise it would be trivial.
У цьому і полягає основна складність завдання, адже без цієї умови - вирішення було б елементарним.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
У цьому і полягає основна складність завдання, адже без цієї умови - вирішення було б елементарним.
У цьому і полягає основна складність завдання, адже без цієї умови -- рішення було б елементарним.

vladiuskor reacted with thumbs up emoji
@javascript-translate-bot
Copy link
Contributor

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

@vladiuskor
Copy link
ContributorAuthor

/done

@vladiuskor
Copy link
ContributorAuthor

Дякую, за чудовий переклад! Вибачаюсь, що вам довелося так довго чекати :) Подивіться, будь ласка, мої коментарі і напишіть мені, якщо з чимось не згодні.

Дякую за можливість зробити внесок у розвиток чудового ресурсу для україномовної спільноти. Згідний з усіма правками.)

dolgachio reacted with thumbs up emojitarasyyyk reacted with heart emoji

@dolgachio
Copy link
Collaborator

@all-contributors add@vladiuskor for translation

@allcontributors
Copy link
Contributor

@stas-dolgachov

I've put upa pull request to add@vladiuskor! 🎉

@dolgachiodolgachio merged commit3038d34 intojavascript-tutorial:masterOct 24, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dolgachiodolgachiodolgachio approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@vladiuskor@CLAassistant@javascript-translate-bot@dolgachio

[8]ページ先頭

©2009-2025 Movatter.jp