Calculator
What the Regex Tester does
Regex Tester: checks Status, Result and Count from Regex pattern, Flags (g i m s u y) and Action. Example: regex pattern (?<user>\w+)@(?<domain>\w+\.\w+), flags (g i m s u y) g and action Find matches and groups gives status Matched 2 time(s).
The inputs are Regex pattern, Flags (g i m s u y), Action and Replacement ($1, $<name>, $& supported); the output is Status, Result and Count. There is no submit step; the numbers move as you adjust them.
It is mostly used by anyone cleaning up machine output. Reading raw machine output is painful; a formatted view makes the structure obvious.
Payloads stay in the tab, so you can safely paste production data without it reaching a third party.
The field reference, the method and a worked example using the default inputs follow the tool itself.
What do the Regex Tester fields mean?
The Regex Tester uses 5 inputs. The starting figures are ordinary, not edge cases, so they make a sensible baseline.
| Field | What to enter | Default |
|---|---|---|
| Regex pattern | required | (?<user>\w+)@(?<domain>\w+\.\w+) |
| Flags (g i m s u y) | optional | g |
| Action | choose from Find matches and groups, Replace or Split text on matches | Find matches and groups |
| Replacement ($1, $<name>, $& supported) | optional | $<user> at $<domain> |
| Test string | paste or type any amount of text | Contact us at hello@yourstools.com or support@example.org |
How does the Regex Tester work?
Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same check.
Validation runs before the calculation, which is why a mistyped value shows an error rather than a plausible-looking result.
Worked example
These are the values the Regex Tester loads by default, and the result it produces from them. The defaults produce the result shown here; change any of them and the answer moves.
| Regex pattern | (?<user>\w+)@(?<domain>\w+\.\w+) |
|---|---|
| Flags (g i m s u y) | g |
| Action | Find matches and groups |
| Replacement ($1, $<name>, $& supported) | $<user> at $<domain> |
| Test string | Contact us at hello@yourstools.com or support@example.org |
| Status | Matched 2 time(s) |
|---|---|
| Result | #1 @14-34: "hello@yourstools.com" group 1: "hello" group 2: "yourstools.com" <user>: "hello"… |
| Count | 2 |
Read next: Why We Run Everything in Your Browser
How to use it
- Key in Regex pattern.
- Fill in Flags (g i m s u y).
- Pick a value for Action: the options are Find matches and groups, Replace or Split text on matches.
- Enter Replacement ($1, $<name>, $& supported).
- Paste your content into Test string.
- It runs on every change, so there is no moment where the screen is out of date.
- Read Status, Result and Count in the results panel.
- If you need a record, Copy Link saves the inputs and Print produces a clean page.
What this tool does not do
- Processing happens in your browser, so very large inputs are bounded by available memory.
- Output follows the common convention for this format; a specific toolchain may have its own house style.
- It will not warn you that a different tool would suit your question better.
Frequently asked questions
Regex pattern, Flags (g i m s u y), Action, Replacement ($1, $<name>, $& supported) and Test string. That is the whole form. A starting value is in place for each, so the quickest approach is to replace the one number you actually care about.
With the values loaded when the page opens, status comes out as Matched 2 time(s). Edit any input and that figure moves with it.
No: there is no server involved. Close the tab and the values are gone.
No cost and no account. Use it as often as you like.
It follows the standard definition for this operation, so the result matches what a reference implementation would give.