Regulair expersions not passing

Tell us what’s happening:

I have all the vowels they provide in the code
and use the ignore and g flag to ignore headletter and smaller once
It calls on the vowelRegex line to check but, it’s still not passing
why?

Your code so far


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.match(vowelRegex); // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15.

Challenge: Match Single Character with Multiple Possibilities

Link to the challenge:

the regex has nothing wrong, it is your use of the method. You need to use match on a string and give it a regexp as an argument
instead you call match on the vowelRegex and then give match vowelRegex as an argument.
your error is TypeError: vowelRegex.match is not a function because match is a string method and vowelRegex is not a string

1 Like