Regular Expressions: Match Single Character with Multiple PossibilitiesPassed

Tell us what’s happening:
For some reason my code isn’t working

Your code so far
let quoteSample = “Beware of bugs in the above code; I have only proved it correct, not tried it.”;
let vowelRegex = /b[aeiou]g/gi; // Change this line
let result = quoteSample.match(vowelRegex); // Change this line


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36.

Challenge: Match Single Character with Multiple Possibilities

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

I thought you needed it to complete a word

Your RegExp is only looking for the matches to “bag”, “beg”, “big”, “bog”, and “bug”. Remove the “b” and “g”, i.e. /[aeiou]/gi. You’re only matching “bug”.

If you can’t figure out how to solve something like this, simply end your code with console.log to debug it (no pun intended :upside_down_face:).

it doesn’t I got rid of it

It logs 25 when I console.log it but won’t run in the code I have before