GREP: Finding a specific word within email and web addresses
Hi
When it comes to GREP I'm a bit of a novice but have managed to put some nifty bits together in paragraph styles and GREP searches to make my life much easier. However, I've just come across an error I hadn't accounted for.
The original plan was to automatically apply a character style to a specific part of an email/web address. For example, my main domain is www.mango.com and I need to bold the 'ang' part. I have a few other domains to consider; www.mymango.com and www.mangofruit.com. I had been using;
(?<=\.m).*?(?=g.)|(?<=\@m).*?(?=g.)
I know email addresses with mymango.com would not be covered because of the \@m, but they're not used. The recent problem I've discovered is some names are captured in email addresses, such as;
bob.mint@mango.com
All email addresses are set as firstname.surname@domain. Is there a way of tweaking my GREP to cover only the part I need to bold and nothing else?
