🔍 Google Sheets regex examples

Extract Email and Phone Examples in Google Sheets

Extract emails, phone numbers, or IDs from messy text. This page gives a clear pattern, five practical examples and common mistakes to avoid.

Updated 2026-06-125 practical examplesCopy-ready formulas

Syntax or pattern

Extract emails, phone numbers, or IDs from messy text.

=REGEXEXTRACT(A2, "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}")
✍️

5 practical examples

1

Check an email pattern

Validate that a cell looks like an email address.

=REGEXMATCH(A2, "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$")

Adjust the ranges, criteria and sheet names to match your workbook.

2

Extract an ID

Pull a structured ID from messy text.

=REGEXEXTRACT(A2, "[A-Z]{3}-[0-9]{4}")

Adjust the ranges, criteria and sheet names to match your workbook.

3

Remove extra punctuation

Clean text before matching or grouping.

=REGEXREPLACE(A2, "[^A-Za-z0-9 ]", "")

Adjust the ranges, criteria and sheet names to match your workbook.

4

Extract numbers

Pull the first number from a text value.

=REGEXEXTRACT(A2, "[0-9]+")

Adjust the ranges, criteria and sheet names to match your workbook.

5

Flag bad SKU formats

Create a validation label for codes.

=IF(REGEXMATCH(A2, "^[A-Z]{2}-[0-9]{5}$"), "OK", "Check")

Adjust the ranges, criteria and sheet names to match your workbook.

Common mistakes to avoid

  • Using patterns that are too broad and capture the wrong text.
  • Forgetting to escape special characters.
  • Assuming every row has a match.

FAQ

What is this Google Sheets page for?

This page gives copy-ready examples for extract email and phone examples so you can understand the pattern and adapt it to real spreadsheet work.

Can I copy these formulas directly?

Yes. Use the copy buttons, then adjust sheet names, ranges, criteria and column references for your own file.

Why does my formula return an error?

The most common causes are mismatched ranges, missing quotes around text criteria, blank source data, or references that do not match your sheet layout.

💡 Useful resources

Here are some ideas for you

Optional resources that may help if you are learning Google Sheets, building trackers, creating dashboards or improving spreadsheet workflows.

  • 📘
    Google Sheets books

    Learn formulas, workflows and dashboards with structured examples.

    See ideas
  • 📊
    Spreadsheet dashboard books

    Improve how you design trackers, summaries and reporting sheets.

    See ideas
  • ⌨️
    Keyboard shortcut guides

    Build speed with navigation, editing and formatting shortcuts.

    See ideas
  • 🔢
    Numeric keypads

    Useful if you enter numbers often on a laptop or compact keyboard.

    See ideas
  • 🖥️
    External monitors

    Helpful for viewing data, formulas and dashboards side by side.

    See ideas
  • 📒
    Desk notebooks

    Sketch formulas, tracker layouts and reporting ideas before building.

    See ideas

Some links in this section may be affiliate links. Choose only what is useful for your own work.