Regex generator for Sheets and Excel
Create and test regular expressions to extract or validate data in your spreadsheets.
1. Pattern
2. Live test
3. Formulas
Google Sheets uses the RE2 engine: no “lookbehind” (?<=…). The suggested patterns are compatible. In French-language Excel 365, type “=REGEX” and let autocomplete suggest the localized function name.
How to use the regex generator for spreadsheets
Create and test regular expressions to extract or validate data in your spreadsheets.
-
Choose a template
Email, phone, postal code, amount, text in parentheses…
-
Test on your rows
Matches are highlighted and the result is shown.
-
Copy the formula
REGEXEXTRACT, REGEXMATCH or REGEXREPLACE ready to paste.
About the regex generator for spreadsheets
Regular expressions let you extract information buried in text: the email in a “Contact: …” cell, the postal code in an address, the amount in an order line. Google Sheets has supported them for a long time, Excel 365 only recently.
The templates are compatible with the RE2 engine of Google Sheets. You can edit the expression and immediately see the result on your own examples.
Frequently asked questions about the regex generator for spreadsheets
Does Excel support regex?
Yes, Excel 365 has offered REGEX functions (extract, test, replace) since 2024. Older versions do not support them.
Why does my regex work here but not in Sheets?
Sheets uses RE2, which does not support some constructs such as lookbehind (?<=…).
Is my data sent to a server?
No. Everything is calculated in your browser: nothing is transmitted to us or stored by us.