I\'m trying to match the start and end character of a string to be the same vowel. My regex is working in most scenarios, but failing in others:
var re = /([aeio
Just a different version of @Hristiyan Dodov answer that I have written for fun.
regex = /^(a|e|i|o|u).*\1$/ const strings = ['abcde', 'abcda', 'aabcdaa', 'aeqwae', 'ouqweru'] strings.forEach((e)=>{ const result = regex.test(e) console.log(e, result) })