Match the same start and end character of a string with Regex

后端 未结 4 784
醉话见心
醉话见心 2021-02-05 02:02

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         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 02:53

    /^([aeiou])[a-z]\1$/
    

    just a bit of improvement, to catch alphabet letters.

提交回复
热议问题