--- id: 587d7db3367417b2b2512b8f title: Match Literal Strings challengeType: 1 videoUrl: '' localeTitle: Combinar cordas literais --- ## Description
No último desafio, você pesquisou a palavra "Hello" usando a expressão regular /Hello/ . Essa regex procurou por uma correspondência literal da string "Hello" . Aqui está outro exemplo em busca de uma correspondência literal da string "Kevin" :
deixe testStr = "Olá, meu nome é Kevin.";
deixe testRegex = / Kevin /;
testRegex.test (testStr);
// Retorna true
Qualquer outra forma de "Kevin" não será igual. Por exemplo, o regex /Kevin/ não coincidirá com "kevin" ou "KEVIN" .
vamos wrongRegex = / kevin /;
wrongRegex.test (testStr);
// Retorna falso
Um desafio futuro mostrará como combinar esses outros formulários também.
## Instructions
Complete o regex waldoRegex para encontrar "Waldo" na string waldoIsHiding com uma correspondência literal.
## Tests
```yml tests: - text: Seu regex waldoRegex deve encontrar "Waldo" testString: 'assert(waldoRegex.test(waldoIsHiding), "Your regex waldoRegex should find "Waldo"");' - text: Seu regex waldoRegex não deve procurar por mais nada. testString: 'assert(!waldoRegex.test("Somewhere is hiding in this text."), "Your regex waldoRegex should not search for anything else.");' - text: Você deve executar uma correspondência literal de string com sua regex. testString: 'assert(!/\/.*\/i/.test(code), "You should perform a literal string match with your regex.");' ```
## Challenge Seed
```js let waldoIsHiding = "Somewhere Waldo is hiding in this text."; let waldoRegex = /search/; // Change this line let result = waldoRegex.test(waldoIsHiding); ```
## Solution
```js // solution required ```