Regex Tester

Run a regular expression over sample text and list every match with its position and capture groups.

  • 100% Free
  • No account required
  • Runs in your browser
  • No data is uploaded
Not saved automatically

Private to this browser, not a cloud backup. Saves expire 7 days after the last save. Avoid saving sensitive data on shared devices.

Saved Regex Tester workspaces

Saved only on this device. Clearing browser data removes your workspaces. Expired saves are removed when this app next checks storage.

No saved workspaces for this tool yet.

Text to Matches

Input

Paste or edit your text, then click “Run tool”.

Type, paste or drop a file
Text
Ln 1, Col 1Spaces: 2UTF-844 bytes

Output

Matches (read-only).

Read-only
Text
Ln 1, Col 1Spaces: 2UTF-80 bytes
Ready when you arePaste your input, then press Run tool or ⌘ ↵

Using the Regex Tester

Overview

Run a regular expression over sample text and list every match with its position and capture groups.

Build and debug a pattern against real sample text before it goes into code, validation rules or a search.

How to use it

  1. Paste or type your Text into Input, drop a file onto it, or press Example to load a sample.
  2. Choose the settings in the Pattern bar under the editors.
  3. Press Run tool, or ⌘ ↵ from anywhere on the page.
  4. Read the result in Output, then copy or download it. The Result tab has size, line counts and next steps.

Input

Text.

Settings

  • Pattern — for example \b\w+\b
  • Flags — for example g

Output

Matches.

  • Lists every match
  • Positions and capture groups
  • All JavaScript flags
  • Global or first-match mode

Tips

  • Add the g flag to list every match instead of only the first.
  • Text Diff compares line by line: + marks an added line, - a removed one.
  • Use the safe regex tester for patterns that might backtrack badly.

Keyboard shortcuts

⌘ ↵
Run the tool
⌘ K
Search every tool
/
Filter the sidebar