• + 0 comments

    A simple solution would be checking if the first and last character are the same and can have any word in b/w. ^a+[\w]+a$

    Then we can repeat it for each of the vowels (added spaces for sake for readability. `/ ^a+[\w]+a$|

    ^e+[\w]+e$|

    ^i+[\w]+i$|

    ^o+[\w]+o$|

    ^u+[\w]+u$ /`

    An advance solution would be to check for the matched value at the starting of the string to the value at end of string. ^([aeiou]).*\1$