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.

FieldWhat to enterDefault
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?

Status, Result and Count ← f(Regex pattern, Flags (g i m s u y), Action, Replacement ($1, $<name>, $& supported), Test string)

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.

Inputs
Regex pattern(?<user>\w+)@(?<domain>\w+\.\w+)
Flags (g i m s u y)g
ActionFind matches and groups
Replacement ($1, $<name>, $& supported)$<user> at $<domain>
Test stringContact us at hello@yourstools.com or support@example.org
Result
StatusMatched 2 time(s)
Result#1 @14-34: "hello@yourstools.com" group 1: "hello" group 2: "yourstools.com" <user>: "hello"…
Count2

How to use it

  1. Key in Regex pattern.
  2. Fill in Flags (g i m s u y).
  3. Pick a value for Action: the options are Find matches and groups, Replace or Split text on matches.
  4. Enter Replacement ($1, $<name>, $& supported).
  5. Paste your content into Test string.
  6. It runs on every change, so there is no moment where the screen is out of date.
  7. Read Status, Result and Count in the results panel.
  8. 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.

YoursTools Team
Product & Engineering

Builds and maintains every calculator on YoursTools.