+ для поиска символов, которые происходят один или несколько раз. Также есть опция, которая соответствует символам, которые появляются ноль или более раз. Характер для этого - asterisk или star : * . let soccerWord = "gooooooooal!";
пусть gPhrase = «чувство кишки»;
пусть oPhrase = "над луной";
let goRegex = / go * /;
soccerWord.match (goRegex); // Возвращает ["goooooooo"]
gPhrase.match (goRegex); // Возвращает ["g"]
oPhrase.match (goRegex); // Возвращает значение null
chewieRegex который использует символ * чтобы соответствовать всем верхним и нижним символам "a" в chewieQuote . Вашему регулярному выражению не нужны флаги, и он не должен совпадать с какими-либо другими цитатами.
chewieRegex should use the * character to match zero or more a characters.
testString: assert(/\*/.test(chewieRegex.source));
- text: Your regex should match "A" in chewieQuote.
testString: assert(result[0][0] === 'A');
- text: Your regex should match "Aaaaaaaaaaaaaaaa" in chewieQuote.
testString: assert(result[0] === 'Aaaaaaaaaaaaaaaa');
- text: Your regex chewieRegex should match 16 characters in chewieQuote.
testString: assert(result[0].length === 16);
- text: Your regex should not match any characters in "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));
- text: Your regex should not match any characters in "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));
```