diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.portuguese.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.portuguese.md index 9ac7a26f28..8914248243 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.portuguese.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.portuguese.md @@ -6,37 +6,37 @@ videoUrl: '' localeTitle: Extrair correspondências --- -## Description -
Até agora, você só verifica se um padrão existe ou não em uma string. Você também pode extrair as correspondências reais encontradas com o método .match() . Para usar o método .match() , aplique o método em uma string e passe o regex dentro dos parênteses. Aqui está um exemplo:
"Olá, mundo!". Match (/ Hello /);
// Retorna ["Olá"]
vamos ourStr = "Expressões regulares";
vamos ourRegex = / expressões /;
ourStr.match (ourRegex);
// Retorna ["expressões"]
+## Descrição +
Até agora, você só verificou se um padrão existe ou não em uma string. Você também pode extrair as correspondências encontradas usando o método .match() . Para usar o método .match() , aplique o método em uma string e passe o regex dentro dos parênteses. Aqui está um exemplo:
"Hello, World!". Match (/ Hello /);
// Retorna ["Hello"]
let ourStr = "Regular expressions";
let ourRegex = / expressions /;
ourStr.match (ourRegex);
// Retorna ["expression"]
-## Instructions -
Aplique o método .match() para extrair a coding palavras.
+## Instrucões +
Aplique o método .match() para extrair a palavra coding .
-## Tests +## Testes
```yml tests: - text: O result deve ter a palavra coding - testString: 'assert(result.join() === "coding", "The result should have the word coding");' + testString: 'assert(result.join() === "coding", "O result deve ter a palavra coding");' - text: Seu regex codingRegex deve procurar por coding - testString: 'assert(codingRegex.source === "coding", "Your regex codingRegex should search for coding");' + testString: 'assert(codingRegex.source === "coding", "Seu regex codingRegex deve procurar por coding");' - text: Você deve usar o método .match() . - testString: 'assert(code.match(/\.match\(.*\)/), "You should use the .match() method.");' + testString: 'assert(code.match(/\.match\(.*\)/), "Você deve usar o método .match().");' ```
-## Challenge Seed +## Desafio
```js -let extractStr = "Extract the word 'coding' from this string."; -let codingRegex = /change/; // Change this line -let result = extractStr; // Change this line +let extractStr = "Extraia a palavra 'coding' da string."; +let codingRegex = /change/; // Altere esta linha +let result = extractStr; // Altere esta linha ``` @@ -46,7 +46,7 @@ let result = extractStr; // Change this line
-## Solution +## Solução
```js