<sectionid="description"> El último desafío utilizó el signo más <code>+</code> para buscar caracteres que aparecen una o más veces. También hay una opción que coincide con los caracteres que aparecen cero o más veces. El personaje para hacer esto es el <code>asterisk</code> o <code>star</code> : <code>*</code> . <blockquote> Deje soccerWord = "gooooooooal!"; <br> dejar gPhrase = "gut feeling"; <br> vamos a oPhrase = "sobre la luna"; <br> vamos goRegex = / go * /; <br> soccerWord.match (goRegex); // Devoluciones ["goooooooo"] <br> gPhrase.match (goRegex); // Devoluciones ["g"] <br> oPhrase.match (goRegex); // Devoluciones nulas </blockquote></section>
<sectionid="instructions"> Cree un regex <code>chewieRegex</code> que use el carácter <code>*</code> para que coincida con todos los caracteres <code>"a"</code> superiores e inferiores en <code>chewieQuote</code> . Su expresión regular no necesita indicadores y no debe coincidir con ninguna de las otras comillas. </section>
- text: Su expresión regular <code>chewieRegex</code> debe utilizar el <code>*</code> carácter a cero o más <code>a</code> personajes.
testString: 'assert(/\*/.test(chewieRegex.source), "Your regex <code>chewieRegex</code> should use the <code>*</code> character to match zero or more <code>a</code> characters.");'
- text: Tu regex <code>chewieRegex</code> debe coincidir con 16 caracteres.
testString: 'assert(result[0].length === 16, "Your regex <code>chewieRegex</code> should match 16 characters.");'
- text: Tu expresión regular debe coincidir con <code>"Aaaaaaaaaaaaaaaa"</code> .
testString: 'assert(result[0] === "Aaaaaaaaaaaaaaaa", "Your regex should match <code>"Aaaaaaaaaaaaaaaa"</code>.");'
- text: 'Tu expresión regular no debe coincidir con ningún carácter en <code>"He made a fair move. Screaming about it can't help you."</code>'
testString: 'assert(!"He made a fair move. Screaming about it can\"t help you.".match(chewieRegex), "Your regex should not match any characters in <code>"He made a fair move. Screaming about it can't help you."</code>");'
- text: 'Tu expresión regular no debe coincidir con ningún carácter en <code>"Let him have it. It's not wise to upset a Wookiee."</code>'
testString: 'assert(!"Let him have it. It\"s not wise to upset a Wookiee.".match(chewieRegex), "Your regex should not match any characters in <code>"Let him have it. It's not wise to upset a Wookiee."</code>");'