Program to match the string should start and end with the same vowels (using regex)


eg 1: 

input : abfsdfsc

outpur : false

eg 2:

input: ifsjfsi

output : true


let regex = /^([aeiou]).*\1$/i

if(regex.test(s)){
  console.log(regex.test(s))
}
else{
    console.log(regex.test(s))
}
    

0 Comments