LocalExcelTool
Get started

Regex generator for Excel

Ready-made patterns for email, URL, phone, dates and money — with a test case.

Runs in your browserNo account neededFree

What is Regex generator for Excel

A regex generator gives you a working pattern instead of a blank box. Each pattern here ships with the input it was tested against, so you can see what it matches before using it — and a note on what it deliberately does not match, which is where most regex advice fails.

This tool needs no input.

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

What ships with each pattern

A pattern, its flags, a sample string it was tested against, and a note on what it deliberately does not match. The test runs when the page renders, so you see "matches" or "does NOT match" for a real input rather than trusting a claim.

Why the email pattern is not RFC-compliant

A fully compliant pattern allows quoted local parts no spreadsheet contains and is unreadable. The practical pattern matches what people type; it will reject addresses with comments or quoted names, which is the right trade for cleaning data.

When not to use it

When you need validation rather than extraction. Regex in Excel 365 runs through REGEXTEST; older versions need VBA or Power Query. And a regex that matches is not a regex that is correct — always test against your worst real row. Test the pattern against a row you expect to reject. A pattern that matches everything is easy to write and useless for validation.

How to use it

  1. 1.Choose the kind of value you are matching.
  2. 2.Copy the pattern and flags.
  3. 3.Paste into REGEXTEST (365) or a VBA RegExp object.

How Regex generator for Excel works under the hood

An .xlsx file is not a table — it is a ZIP archive of XML parts. Everything you see as a grid is rebuilt from cell references on this page, in memory, without a round trip to a server.

  1. 1

    Read the file as bytes

    The file is read into an ArrayBuffer with the File API. This is a local read, not a request — nothing leaves the tab.

  2. 2

    Unzip and parse the workbook

    SheetJS inflates the archive, reads workbook.xml for sheet order, sharedStrings.xml for text, and each sheet's XML for cells and types.

  3. 3

    Rebuild rows in memory

    Cells are placed by their A1 reference, gaps become empty cells, and the sheet is materialised as a two-dimensional array.

  4. 4

    Write the output locally

    The result is serialised to CSV text or a new workbook and handed to the browser as a Blob download.

  5. Processing pipeline

Why formulas arrive as values

A spreadsheet stores two things per formula cell: the formula text, and the value Excel last computed and cached. A browser parser reads the cached value. Making the formula itself run would mean reimplementing Excel's calculation engine — including volatile functions, circular-reference detection and locale-specific parsing. So the exported CSV contains what you last saw on screen, not a live formula.

What has no CSV equivalent

Merged cells, cell fills, fonts, conditional formatting, comments and pivot tables have no representation in a comma-separated file. A merged cell becomes its value in the top-left position and empty cells elsewhere. Dates are written as dates only when the cell is typed as a date; a date stored as text stays text. These are format limits, not bugs.

Where it gets slow

Parsing is linear in cell count, and the browser holds the whole workbook in memory. A 30 MB file with a million populated cells can take several seconds and a few hundred MB of RAM; the tab may feel frozen while SheetJS works. Splitting the file by sheet, or exporting only the range you need, is faster than retrying with a bigger limit.

Verify it yourself

You do not have to take this on faith. Run the tool once with DevTools open.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

Does Excel support regex?

Only Microsoft 365 does, via REGEXTEST / REGEXEXTRACT / REGEXREPLACE. Older versions need VBA or Power Query — the pattern itself is the same, only where you paste it changes.

Why is the email pattern not RFC-compliant?

Because RFC 5322 allows quoted local parts that no real spreadsheet contains, and a compliant pattern is unreadable. This one matches what people actually type.

What this kind of conversion cannot keep

Spreadsheet conversion is lossy by nature: a workbook carries formulas, styles, merged cells and multiple sheets, while CSV carries rows of text. This tool keeps values and order, recalculates nothing, and drops presentation on purpose. That is why it can run without a server — and why a converted file will not look like the original.

More in Spreadsheets & Docs