IcEWaRRiOr_2002
@IcEWaRRiOr_2002

Как правильно решить это задание?

Бьюсь с заданием со вчерашнего дня. Тема Regular Expressions: Match Single Character with Multiple Possibilities.

let quoteSample = "Beware of bugs in the above code; I have only proved it correct, not tried it.";
let vowelRegex = /[aeiou]/gi; // Change this line
let result = vowelRegex.test(quoteSample); // Change this line


// running tests
You should find all 25 vowels.
Your regex should not match any consonants.
// tests completed


☒ You should find all 25 vowels.
☑ Your regex vowelRegex should use a character class.
☑ Your regex vowelRegex should use the global flag.
☑ Your regex vowelRegex should use the case insensitive flag.
☒ Your regex should not match any consonants.

(галочка - выполненное, крестик - невыполненное)
  • Вопрос задан
  • 59 просмотров
Решения вопроса 1
@dodo512
let result = vowelRegex.test(quoteSample); // Change this line

Заменить на
let result = quoteSample.match(vowelRegex);
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы