how to check for the first vowel in a string code example
Example 1: match a string that starts and ends with the same vowel
const regex = /\b(?<vowel>[aeiou])(\w*\k<vowel>)?\b/
Example 2: vowel
const vowelsArray = "aeiou".split("");
const regex = /\b(?<vowel>[aeiou])(\w*\k<vowel>)?\b/
const vowelsArray = "aeiou".split("");