Skip to content

Extract an email address from text

Pull the email address out of a sentence or a messy cell using a regular expression.

The formula

Argument separator
Excel · Excel 365 only (REGEX functions)
=REGEXEXTRACT(A2, "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}")
Google Sheets
=IFERROR(REGEXEXTRACT(A2, "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}"), "")

How it works

  1. [A-Za-z0-9._%+-]+

    The name part: letters, digits and . _ % + -

  2. @[A-Za-z0-9.-]+

    The @ sign followed by the domain name.

  3. \.[A-Za-z]{2,}

    A dot and an ending of two or more letters, like .com or .co.uk.

Example

A: TextB: Result
Contact: jane.doe@acme.com (sales)jane.doe@acme.com
No email here

Tips

  • Use the Regex formula tool to build patterns for phone numbers, IDs and more.