regex get string between start and end match javascript code example Example: regular expression start and end with same character javascript /^([aeiou]).*\1$/i