LocalExcelTool
Get started

Regex Tester

Write a regex and see matches instantly, with capture groups and positions.

What is Regex Tester

A regex tester applies a regular expression pattern to a string and shows where it matches. Enter a pattern, flags and test text to see the match count, positions and capture groups.

🔒 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

It runs JavaScript's engine, with JavaScript's rules

The pattern is compiled with new RegExp, so it follows ECMAScript semantics — not PCRE, not Python's re, not Go's RE2. Named groups are (?<name>…), lookbehind (?<=…) and (?<!…) are supported in current engines, but atomic groups (?>…) and possessive quantifiers (a++) are not, and \p{…} requires the u flag.

The practical consequence is that a pattern copied from a PHP or Python codebase may behave differently or not compile at all. The error message names the offset where compilation failed, which usually points straight at the unsupported construct.

Catastrophic backtracking is a real hazard

A nested quantifier such as (a+)+b, run against a long string of a's that does not end in b, takes exponential time. The tab freezes, and no error is raised because nothing is wrong with the pattern — it is the search space that explodes. Any regex that will run on user input needs to be checked against this.

The fixes are structural: replace (a+)+ with a+ where the nesting adds nothing, use atomic grouping or possessive quantifiers where the engine allows, or anchor the pattern. When the engine has no such support, the safe move is to bound the input length and run the match outside the request path.

Reading the result correctly

With the g flag, lastIndex persists between calls on the same object, so repeated .test() calls alternate true and false — a classic bug. This tester creates a fresh instance per run, which is why the result does not flicker here but may in your own code.

For patterns with groups, the output shows numbered and named captures plus their indices. Remember that an optional group that did not participate is undefined rather than empty string, and that a zero-length match is still a match — validate the captured values, not just whether something matched.

How to use

  1. 1.Enter a regex pattern
  2. 2.Add flags and test text
  3. 3.Inspect the matches

How this compares

There are three ways to do this conversion: in the browser (this page), through a server-side converter, or with a desktop app. The useful difference is not speed — it is where your file goes and how far the free tier actually reaches.

AspectThis toolUpload-based converters
Where the file is processedIn your browser, on this pageOn the vendor's servers, after an upload
Account requiredNoUsually — free tiers ask you to sign in before lifting a limit
Size you can process for freeNo size cap, no run limitA few files per hour, or a ~5–10 MB cap before a paywall
PriceFree. Pro is $9/month, and only buys larger files and AI featuresUsually a subscription — roughly $7–15/month as of November 2026
Works offlineYes, once the page has loadedNo
Time before work starts on a 20 MB fileImmediate — there is nothing to uploadDominated by the upload — about 16 s on a 10 Mbps uplink
What it cannot preserveNothing is stored, which also means a closed tab cannot be recoveredThe same — the conversion is the same maths

Server-side converters are genuinely better at some things: very large files, sharing results with a team, keeping a conversion history, and automating batches from a script. For the case in front of you — one file, one format change, right now — they mostly add an upload wait and a sign-up form.

Frequently asked questions

Which flags are supported?

JavaScript regex flags such as g, i, m, s and u. You can combine them.

How are matches shown?

You get the match count, start/end positions and capture groups.

Is input uploaded?

No. Matching uses the browser's built-in RegExp.

What this kind of conversion cannot keep

Text tools never leave the page: the string you paste is transformed in memory and written back to the result box. There is no request, no log and no retention, which also means there is no way to recover a value you closed the tab on.

More in Text