Methods of RegExp and String by fsdude · Pull Request #141 · javascript-tutorial/pt.javascript.info
Repository navigation
Methods of RegExp and String - #141
Merged
nazarepiedady merged 42 commits into javascript-tutorial:master from fsdude:17-regexp-methods May 1, 2024
Merged
Methods of RegExp and String #141 nazarepiedady merged 42 commits into javascript-tutorial:master from fsdude:17-regexp-methods
Conversation
fsdude commented May 24, 2020
Copy link Copy Markdown
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
Translation to portuguese done. Source file can be found: https://git...
a668310
...hub.com/javascript-tutorial/en.javascript.info/blob/master/9-regular-expressions/17-regexp-methods/article.mdjavascript-translate-bot added the review needed label May 24, 2020 javascript-translate-bot requested a review from a team May 24, 2020 10:59 iliakan mentioned this pull request May 24, 2020 Portuguese Translation Progress #1 Open fsdude added 3 commits May 25, 2020 19:17
Removed files that aren't used anymore on english version
f7e7f38
Translated english article to portuguese following the english version
a906139
reuploaded the svg file quoted on article (other one was broken)
60a9345
odsantos
added a commit
that referenced
this pull request
May 26, 2020
Transfer file translation #141
2d9655b
odsantos commented Dec 8, 2020
Copy link Copy Markdown
Contributor
|
Hi @fsdude would you please resolve the conflicts, or kindly inform if unavailable to? Thank you. |
fsdude commented Dec 9, 2020
Copy link Copy Markdown
Contributor
Author
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 =) |
Resolve conflicts.
93a763d
Merge branch 'fsdude-02-regexp-character-classes' into master
41188c4
Merge branch '02-regexp-character-classes' of https://github.com/fsdu...
2f7d7ed
...de/pt.javascript.info into fsdude-02-regexp-character-classes
Merge branch 'fsdude-02-regexp-character-classes' into master
e9c30ce
Delete old directory.
0faf9be
Merge branch 'fsdude-02-regexp-character-classes' into master
df62d2c
Merge branch '17-regexp-methods' of https://github.com/fsdude/pt.java...
e15db78
...script.info into fsdude-17-regexp-methods
Merge branch 'fsdude-17-regexp-methods' into master
5302f46
CLAassistant commented Dec 25, 2020 · edited Loading
Copy link Copy Markdown
|
|
Revert "Merge branch 'fsdude-02-regexp-character-classes' into master"
0661b81
This reverts commit df62d2c, reversing changes made to e9c30ce.
Revert "Merge branch 'fsdude-02-regexp-character-classes' into master"
bfab762
This reverts commit e9c30ce, reversing changes made to 41188c4.
Revert "Merge branch 'fsdude-02-regexp-character-classes' into master"
38aa681
This reverts commit 41188c4, reversing changes made to 0c959f9.
Revert "Revert "Merge branch 'fsdude-02-regexp-character-classes' int...
cdade39
...o master"" This reverts commit 38aa681.
Revert "Revert "Revert "Merge branch 'fsdude-02-regexp-character-clas...
30fcc30
...ses' into master""" This reverts commit cdade39.
Revert "Revert "Revert "Revert "Merge branch 'fsdude-02-regexp-charac...
72e1fa8
...ter-classes' into master"""" This reverts commit 30fcc30.
Revert "Revert "Revert "Revert "Revert "Merge branch 'fsdude-02-regex...
08e5000
...p-character-classes' into master""""" This reverts commit 72e1fa8.
Revert "Revert "Revert "Revert "Merge branch 'fsdude-02-regexp-charac...
082dff2
...ter-classes' into master"""" This reverts commit 30fcc30.
Revert "Merge branch 'fsdude-02-regexp-character-classes' into master"
f86d836
This reverts commit df62d2c, reversing changes made to e9c30ce.
Revert "Merge branch 'fsdude-02-regexp-character-classes' into master"
72ffd48
This reverts commit e9c30ce, reversing changes made to 41188c4.
Revert "Merge branch 'fsdude-02-regexp-character-classes' into master"
24b8013
This reverts commit 41188c4, reversing changes made to 0c959f9.
peruibeloko commented Jan 17, 2024
Copy link Copy Markdown
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. |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| Possui 3 modos : | ||
|
|
||
| 1. If the `regexp` doesn't have flag ` pattern :g`, then it returns the first match as an array with capturing groups and properties `index` ( position of the match ), `input` ( input string , equals `str`): | ||
| 1. Se a `regexp` não tiver a flag ` 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`): |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| ``` | ||
|
|
||
| 2. If the `regexp` has flag ` pattern :g`, then it returns an array of all matches as strings, without capturing groups and other details . | ||
| 2. Se a `regexp` tiver a flag ` padrão :g`, ela retornará uma matriz com todas as correspondências como strings, sem capturar grupos e outros detalhes . |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| ``` | ||
|
|
||
| 3. If there are no matches, no matter if 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 . |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| ## str.matchAll(regexp) | ||
|
|
||
| [ recent browser ="new"] | ||
| [ navegador recente ="new"] |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| Você pode ver isso no exemplo acima: apenas o primeiro `"-"` é substituído por `":"`. | ||
|
|
||
| To find all hyphens, we need to use not the string `"-"`, but a regexp ` pattern :/-/g`, with the obligatory `pattern :g` flag : | ||
| Para encontrar todos os hífens, não precisamos usar a string `"-"`, mas a regexp ` padrão :/-/g`, com a flag obrigatória `padrão :g`: |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| Se comporta de modo diferente dependendo se a regexp possui a flag ` 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 . |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| - 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 a flag ` padrão :g`, então : |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| ``` | ||
|
|
||
| If the regexp has flag ` pattern :y`, then the search will be performed exactly at the position `regexp.lastIndex`, not any further . | ||
| Se o regexp tiver flag ` padrão :y`, então a pesquisa será realizada exatamente na posição `regexp.lastIndex`, nada mais . |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| Se o regexp tiver flag ` padrão :y`, então a pesquisa será realizada exatamente na posição `regexp.lastIndex`, nada mais . | ||
|
|
||
| Let's replace flag ` pattern :g` with `pattern :y` in the example above. There will be no matches, as there's no word at position `5 `: | ||
| Vamos substituir a flag ` padrão :g` pela `padrão :y` no exemplo acima. Não haverá correspondências, como não haverá palavra na posição `3 `: |
View reviewed changes
Comment thread 9-regular-expressions/17-regexp-methods/article.md
Outdated
| ``` | ||
|
|
||
| If the regexp has flag ` pattern :g`, then `regexp.test` looks from `regexp.lastIndex` property and updates this property, just like `regexp.exec`. | ||
| Se a regexp tiver a flag ` padrão :g`, então `regexp.test` procura a partir da propriedade `regexp.lastIndex` e atualiza esta propriedade, assim como `regexp.exec`. |
odsantos commented Jan 18, 2024
Copy link Copy Markdown
Contributor
@peruibeloko I'll include your corrections as soon as possible. Thank you. |
nazarepiedady commented Mar 10, 2024
Copy link Copy Markdown
Member
|
@odsantos , @jonnathan-ls , @peruibeloko , what do you recommend colleagues to be done in this pull request? |
Merge branch 'master' of https://github.com/javascript-tutorial/pt.ja...
04f88aa
...vascript.info into pr/141
refactor: fixes merge conflicts, translates pending content and appli...
3565c17
...es suggestions according to code reviewjonnathan-ls approved these changes Apr 28, 2024
View reviewed changes
jonnathan-ls left a comment · edited Loading
Copy link Copy Markdown
Contributor
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 review 3565c17
Can you evaluate this PR again?
I'm also leaving my LGTM as a review
javascript-translate-bot added needs +1 and removed review needed labels Apr 28, 2024 nazarepiedady reviewed Apr 28, 2024View reviewed changes
nazarepiedady left a comment
Copy link Copy Markdown
Member
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?
Comment thread 9-regular-expressions/17-regexp-methods/article.mdOutdated
| ## 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`. |
refactor: fixes syntax spelling error
ab578b0
nazarepiedady
approved these changes
Apr 28, 2024
View reviewed changes
nazarepiedady left a comment
Copy link Copy Markdown
Member
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 commented Apr 28, 2024
Copy link Copy Markdown
Member
|
@jonnathan-ls , you need to approve and merge if you have time for that, too. |
jonnathan-ls commented Apr 28, 2024
Copy link Copy Markdown
Contributor
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 commented Apr 29, 2024
Copy link Copy Markdown
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 commented Apr 29, 2024
Copy link Copy Markdown
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 commented Apr 29, 2024
Copy link Copy Markdown
Member
|
@peruibeloko , could you help us review this 4 years old pull request? |
View reviewed changes
peruibeloko commented May 1, 2024
Copy link Copy Markdown
Contributor
|
LGTM! |
7b8bd10
into
javascript-tutorial : master
May 1, 2024
javascript-translate-bot commented May 1, 2024
Copy link Copy Markdown
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |