Neatbo.

Regex tester

Try a pattern and see what it matches in your text.

Browser-local processingInputRegex + textOutputMatches
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.

⌘ / Ctrl + Enter to run
0 characters · 0 bytes
Options

Complete the required options first. You can keep the defaults for the rest.

Preparing the tool…

Before you start

Test JavaScript regular expressions against local text. Matches include indices and groups; a disposable worker enforces a two-second execution limit and caps the match list at 1,000.

How to use this tool

  1. Paste sample text into “Test text”, or load the example.
  2. Enter a JavaScript regular expression and choose its flags in Settings, then select “Test expression”.
  3. Inspect highlighted matches, positions and capture groups. A count of zero means the pattern found no match.

Supported inputs and limits

A pattern up to 4 KiB, sample text up to 256 KiB, a hard two-second worker limit and at most 1,000 matches. Only JavaScript flags i, m, g, s, u and y are accepted.

Worked example

Example input

ab12 cd34
Example options
{
  "pattern": "(\\d+)",
  "flags": "g"
}

Example output

{
  "matches": [
    {
      "index": 2,
      "end": 4,
      "text": "12",
      "groups": [
        "12"
      ],
      "named": {}
    },
    {
      "index": 7,
      "end": 9,
      "text": "34",
      "groups": [
        "34"
      ],
      "named": {}
    }
  ],
  "capped": false,
  "count": 2
}

When something does not work

Correct the reported syntax or range and run again. Formatting is not execution: scripts, SQL, expressions and pasted markup do not run against your system or a remote service.

Frequently asked questions

Are my files uploaded?

No. Files and tool input are processed in your browser. Moving around the site can keep a temporary workspace in the same tab. Refreshing or closing the tab clears it, so download results you want to keep.

What should I check in this result?

Test JavaScript regular expressions against local text. Matches include indices and groups; a disposable worker enforces a two-second execution limit and caps the match list at 1,000.

Documentation & further reading

Related tools