What is GREP?
GREP (Global Regular Expression Parser) is an extraordinarily powerful tool for locating and formatting document content based on pattern—zip codes, email addresses, and phone numbers are just a few of the most obvious types of GREP targets. GREP can also be used to find the first letter or word of a sentence, multiple spaces and returns and SO much more—in short, pretty much any pattern you can define, GREP can help you find.
Excerpted from Chapter 25 of Interactive InDesign CC, the following is a diagram of a GREP query that targets email addresses in their many variations.
Examples of email addresses captured by the above query:
Jane - Marie.Doe@example.com
Jane_Marie.G.Doe@dept - 3.com
Jane - Marie.G.Doe123@dept - 3.com.edu