...
and then instruct all after @ symbol to be uppercase with this replacement:
$1@\U$2
Performing case-insensitive searches
By adding (?i)
in the beginning of your transformation you will get case-insensitive searches. So if your transformation is (?i)(.*)@example.com
this will both match all case versions of the domain name like john.doe@example.com
, john.doe@Example.Com
and john.doe@EXAMPLE.COM
.
See more details on the language of regular expressions here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
You may also build and test regex matches here: