match from end of string regex code example
Example 1: regex match exact string
you want to achieve a case insensitive match for the word "rocket"
surrounded by non-alphanumeric characters. A regex that would work would be:
\W*((?i)rocket(?-i))\W*
Example 2: regular expression start and end with same character javascript
/^([aeiou]).*\1$/i