Match Single Character with Multiple Possibilities help

Match Single Character with Multiple Possibilities help
0.0 0

#1

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


#2

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.


#3

Oh I understand, thanks so much!


#4

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