ExcelTool.io

Excel REGEX Generator & Tester

Test a regular expression against your own text and get ready-to-paste REGEXEXTRACT, REGEXREPLACE, and REGEXTEST formulas for Excel and Google Sheets. Everything runs in your browser.

2 matches

Contact: «jane@example.com» or «sales@acme.co». Order #12345 on 2026-07-09.

  • jane@example.com
  • sales@acme.co

Generate the Excel formula

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

Keep only rows that match, in one formula:

=FILTER(A:A, REGEXTEST(A:A, "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}"))

Using Regular Expressions in Excel

Since 2024, Microsoft 365 includes three native regex functions, so you no longer need nested LEFT/MID/FIND formulas or VBA to pull structured text out of a cell:

  • REGEXTEST(text, pattern) - returns TRUE or FALSE. Use it to flag rows, in conditional formatting, or inside IF and FILTER.
  • REGEXEXTRACT(text, pattern) - returns the first match. Pull an email, an order number, or a date out of a messy cell.
  • REGEXREPLACE(text, pattern, replacement) - swap every match for new text. Strip characters, reformat, or clean data in one pass.

Build and test your pattern above, copy the generated formula, and paste it into Excel. Because the tester uses your browser's own regex engine, the matches you see are exactly what the pattern will find.

Does It Work in Google Sheets?

Yes. The pattern syntax is shared, so any pattern here works in Google Sheets too. Sheets uses REGEXMATCH instead of REGEXTEST; the REGEXEXTRACT and REGEXREPLACE names are identical.

Common Patterns

The preset buttons above load ready-made patterns for emails, URLs, phone numbers, prices, dates, and ZIP codes. Click one, then adjust it against your own sample text until the matches look right.

Frequently Asked Questions

Related Tools