Match Single Character with Multiple Possibilities help

Tell us what’s happening:
I can’t figure out why this isn’t working-please help!

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]/ig; // Change this line
let result = vowelRegex.match(quoteSample); // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities

match is a method that can be called on a string and that accepts a regular expression as a parameter. You are trying to call match on the regular expression with a string as parameter.

2 Likes

Oh I understand, thanks so much!

Solved:

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