Using the following text:
john.doe@company.com
george.dufus@company.com
ringo@company.com
paul.henry.whoever@company.com
The regex needs to capitalize only the first letter of the name parts (left of the @ symbol) and leave the right side alone.
The regex is:
(\b\w|\b\w\.\K\w)(?=.+@)
Replace is:
\u$1
As can be seen in the below, it seems the \K is missed and matches to the right as well:
Here's what should happen: