+ 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 asterisk o star : * . Deje soccerWord = "gooooooooal!";
dejar gPhrase = "gut feeling";
vamos a oPhrase = "sobre la luna";
vamos goRegex = / go * /;
soccerWord.match (goRegex); // Devoluciones ["goooooooo"]
gPhrase.match (goRegex); // Devoluciones ["g"]
oPhrase.match (goRegex); // Devoluciones nulas
chewieRegex que use el carácter * para que coincida con todos los caracteres "a" superiores e inferiores en chewieQuote . Su expresión regular no necesita indicadores y no debe coincidir con ninguna de las otras comillas. chewieRegex debe utilizar el * carácter a cero o más a personajes.
testString: 'assert(/\*/.test(chewieRegex.source), "Your regex chewieRegex should use the * character to match zero or more a characters.");'
- text: Tu regex chewieRegex debe coincidir con 16 caracteres.
testString: 'assert(result[0].length === 16, "Your regex chewieRegex should match 16 characters.");'
- text: Tu expresión regular debe coincidir con "Aaaaaaaaaaaaaaaa" .
testString: 'assert(result[0] === "Aaaaaaaaaaaaaaaa", "Your regex should match "Aaaaaaaaaaaaaaaa".");'
- text: 'Tu expresión regular no debe coincidir con ningún carácter en "He made a fair move. Screaming about it can't help you."'
testString: 'assert(!"He made a fair move. Screaming about it can\"t help you.".match(chewieRegex), "Your regex should not match any characters in "He made a fair move. Screaming about it can't help you."");'
- text: 'Tu expresión regular no debe coincidir con ningún carácter en "Let him have it. It's not wise to upset a Wookiee."'
testString: 'assert(!"Let him have it. It\"s not wise to upset a Wookiee.".match(chewieRegex), "Your regex should not match any characters in "Let him have it. It's not wise to upset a Wookiee."");'
```