Last active
August 11, 2021 02:16
-
-
Save lyssacavalcanti/def48fbc638c806c40a6f81780e9976e to your computer and use it in GitHub Desktop.
Regular Expressions - Match Single Character with Multiple Possibilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use a character class with vowels (a, e, i, o, u) in your regex vowelRegex to find all the vowels in the string quoteSample. | |
Note: Be sure to match both upper- and lowercase vowels. | |
Tests: | |
You should find all 25 vowels. | |
Your regex vowelRegex should use a character class. | |
Your regex vowelRegex should use the global flag. | |
Your regex vowelRegex should use the case insensitive flag. | |
Your regex should not match any consonants. | |
________________________________________________ | |
let quoteSample = "Beware of bugs in the above code; I have only proved it correct, not tried it."; | |
let vowelRegex = /[aeiou]/gi; | |
let result = quoteSample.match(vowelRegex); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment