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

Methods of RegExp and String#141

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

Conversation

fsdude
Copy link
Contributor

Translation to portuguese done. Followed the english version again.

Source file can be found:https://github.com/javascript-tutorial/en.javascript.info/blob/master/9-regular-expressions/17-regexp-methods/article.md

odsantos added a commit that referenced this pull requestMay 26, 2020
@odsantos
Copy link
Contributor

Hi@fsdude would you please resolve the conflicts, or kindly inform if unavailable to? Thank you.

@fsdude
Copy link
ContributorAuthor

Hi@fsdude would you please resolve the conflicts, or kindly inform if unavailable to? Thank you.

Hello! Yeah.. lately I've been busy with some work. I don't know if I'll be able to fix this soon, sorry for that =)
Thanks by the way

@CLAassistant
Copy link

CLAassistant commentedDec 25, 2020
edited
Loading

CLA assistant check
All committers have signed the CLA.

…p-character-classes' into master"""""This reverts commit72e1fa8.
@peruibeloko
Copy link
Contributor

@odsantos the PRs#147,#141 (this one) and#274 all translated parts of the text that weren't meant to have been translated.

The parts in question are the `pattern:`, `subject:` and `match:` decorators used in the Regex chapters, as they're used by the site builder literally. Changing this might break the builds! My evidence for this is that all of them match the class names used in the HTML output of the site.

jonnathan-ls reacted with heart emoji

Possui 3 modos:

1.If the`regexp`doesn't haveflag`pattern:g`,then it returns the first match as an array with capturing groups and properties`index` (position of the match),`input` (inputstring, equals`str`):
1.Se a`regexp`não tiver aflag`padrão:g`,ela retornará a primeira correspondência como uma matriz com a captura de grupos e propriedades`index` (posição da correspondência),`input` (string de entrada, igual a`str`):
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

```

2.If the`regexp`hasflag`pattern:g`,then it returns an arrayof all matches as strings,without capturing groups and other details.
2.Se a`regexp`tiver aflag`padrão:g`,ela retornará uma matriz com todas as correspondências como strings,sem capturar grupos e outros detalhes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

```

3.If there are no matches, no matterif there's flag `pattern:g`or not, `null`is returned.
3.Se não houver correspondências, não importa se há flag`padrão:g`ou não,`null`é retornado.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

##str.matchAll(regexp)

[recent browser="new"]
[navegador recente="new"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be translated

Você pode ver isso no exemplo acima: apenas o primeiro`"-"`é substituído por`":"`.

To find all hyphens, we need to use not thestring `"-"`,but a regexp `pattern:/-/g`,with the obligatory `pattern:g` flag:
Para encontrar todos os hífens, não precisamos usar astring`"-"`,mas a regexp`padrão:/-/g`,com a flag obrigatória`padrão:g`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

Se comporta de modo diferente dependendo se aregexppossui aflag`padrão:g`.

If there's no`pattern:g`,then`regexp.exec(str)`returns the first match exactly as`str.match(regexp)`.This behavior doesn't bring anything new.
Se não houver`padrão:g`,a`regexp.exec(str)`retorna a primeira correspondência exatamente como`str.match(regexp)`.Esse comportamento não traz nada de novo.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

-The next such call starts the search from position`regexp.lastIndex`,returns the next match and saves the position after it in`regexp.lastIndex`.
- ...And so on.
-If there are no matches,`regexp.exec`returns`null`and resets`regexp.lastIndex`to`0`.
Mas se houver aflag`padrão:g`,então:
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

```

If the regexphas flag`pattern:y`,then the search will be performed exactly at the position`regexp.lastIndex`,not any further.
Se o regexptiver flag`padrão:y`,então a pesquisa será realizada exatamente na posição`regexp.lastIndex`,nada mais.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

Se o regexptiver flag`padrão:y`,então a pesquisa será realizada exatamente na posição`regexp.lastIndex`,nada mais.

Let's replaceflag`pattern:g`with`pattern:y`in the example above. There will be no matches, as there's no word at position`5`:
Vamos substituir aflag`padrão:g`pela`padrão:y`no exemploacima.Não haverá correspondências, como não haverá palavra na posição`3`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

```

If the regexphasflag`pattern:g`,then`regexp.test`looks from`regexp.lastIndex`property and updates this property, just like`regexp.exec`.
Se a regexptiver aflag`padrão:g`,então`regexp.test`procura a partir da propriedade`regexp.lastIndex`e atualiza esta propriedade, assim como`regexp.exec`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thepattern: syntax shouldn't be translated

@odsantos
Copy link
Contributor

@odsantos the PRs#147,#141 (this one) and#274 all translated parts of the text that weren't meant to have been translated.

The parts in question are thepattern:,subject: andmatch: decorators used in the Regex chapters, as they're used by the site builder literally. Changing this might break the builds! My evidence for this is that all of them match the class names used in the HTML output of the site.

@peruibeloko I'll include your corrections as soon as possible. Thank you.

peruibeloko reacted with thumbs up emojiperuibeloko reacted with heart emoji

@nazarepiedady
Copy link
Member

@odsantos,@jonnathan-ls,@peruibeloko, what do you recommend colleagues to be done in this pull request?

Copy link
Contributor

@jonnathan-lsjonnathan-ls left a comment
edited
Loading

Choose a reason for hiding this comment

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

@nazarepiedady@odsantos@peruibeloko

I updated the PR with the master branch, fixed merge conflicts, translated pending content and applied the suggestions highlighted as code review3565c17

Can you evaluate this PR again?

I'm also leaving my LGTM as a review

Copy link
Member

@nazarepiedadynazarepiedady left a comment

Choose a reason for hiding this comment

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

@jonnathan-ls, is all pending work solved?

##str.match(regexp)

The method`str.match(regexp)`finds matches for`regexp`in the string`str`.
O método`str.macth(regexp)`pesquisa correspondências para`regexp`na string`str`.

Choose a reason for hiding this comment

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

@jonnathan-ls, thanks for saving some of your time to work on this. It is very praiseworthy.

I would like to point out a little spelling mistake where it is writtenstr.macth should bestr.match.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the observation, I added the correction

Copy link
Member

@nazarepiedadynazarepiedady left a comment

Choose a reason for hiding this comment

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

It was an excellent work, let's go forward.

@nazarepiedady
Copy link
Member

@jonnathan-ls, you need to approve and merge if you have time for that, too.

jonnathan-ls reacted with heart emoji

@jonnathan-ls
Copy link
Contributor

you need to approve and merge if you have time for that, too.

I left my approval, but I don't see any point in merging without the other reviewers who registered observations not reviewing it again yet.

I don't think it's worth closing change requests from other code reviewers

@nazarepiedady
Copy link
Member

@jonnathan-ls, we will wait most likely for centuries if we wait for others even when we have two approvals. The current pull request is 4 years old. It is too much time.

@nazarepiedady
Copy link
Member

@jonnathan-ls, let's do this way. You approve, and we will wait at least one week to get one more approval to merge the changes.

@nazarepiedady
Copy link
Member

@peruibeloko, could you help us review this 4 years old pull request?

peruibeloko reacted with thumbs up emoji

@peruibeloko
Copy link
Contributor

LGTM!

nazarepiedady reacted with thumbs up emoji

@nazarepiedadynazarepiedady merged commit7b8bd10 intojavascript-tutorial:masterMay 1, 2024
@javascript-translate-bot

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

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

Reviewers

@jonnathan-lsjonnathan-lsjonnathan-ls approved these changes

@nazarepiedadynazarepiedadynazarepiedady approved these changes

@odsantosodsantosAwaiting requested review from odsantos

+1 more reviewer

@peruibelokoperuibelokoperuibeloko approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@fsdude@odsantos@CLAassistant@javascript-translate-bot@peruibeloko@nazarepiedady@jonnathan-ls

[8]ページ先頭

©2009-2025 Movatter.jp