Regex-Match Single characters with multiple possibilities

Regex-Match Single characters with multiple possibilities
0
#1
let quoteSample = "Beware of bugs in the above code; I have only proved it correct, not tried it.";
let vowelRegex = /[a,e,i,o,u]/gi; // Change this line
let result = quoteSample.match(vowelRegex); // Change this line
console.log(result);

When I d’ont type ’ i ’
This is the error:Your regex vowelRegex should use the case insensitive flag.
Which I understand.
When I type ’ i ’

This is the error:You should find all 25 vowels.

#2

problem is in second line .change your code withvowelRegex = /[aeiou]/gi;.

#3

Character classes (the technical term for stuff inside square brackets in a regex) don’t use commas to separate items. If you wanted to match all q’s x’s, and z’s for example, you’d use [qxz], not [q,x,z]. Your character class is also matching the comma in the string, which is resulting in 26 matches, not 25.