Developer Utilities

Regex Tester

Test regular expressions against sample text with clear matches and common flags.

regex testerregular expression toolregex debugger
L

This tool runs locally in your browser. Your input is not sent to a backend or paid API.

Regex Tester

Test JavaScript regular expressions against sample text locally.

Regex flags

How to use

How to use Regex Tester

Follow this workflow to complete the task locally without leaving the page.

  1. 1

    Enter a regular expression pattern without wrapping slashes.

  2. 2

    Choose the flags you want to test, such as global, ignore case, or multiline.

  3. 3

    Paste sample text into the test area.

  4. 4

    Run the test to view matches, indexes, and captured groups.

Examples

Example inputs

Use these examples to understand common workflows and expected input formats.

Extract email addresses

Find email-like strings in logs, pasted text, or fixture data.

[\w.%+-]+@[\w.-]+\.[A-Za-z]{2,}

Find slug candidates

Match lowercase words separated by hyphens when validating URL slugs.

^[a-z0-9]+(?:-[a-z0-9]+)*$

FAQ

Regex Tester FAQ

Answers to common questions about behavior, privacy, and practical usage.

Which regex engine does this tool use?

It uses the JavaScript RegExp engine available in your browser, so behavior matches JavaScript regular expressions.

Should I include slashes around the pattern?

No. Enter only the pattern body, such as \d+ or [a-z]+. Select flags with the controls instead of typing /pattern/g.

Can I inspect capture groups?

Yes. When a match includes captured groups, the results list shows each group under the matching value.

Does the Regex Tester upload my test text?

No. Pattern testing runs locally in your browser and does not send your sample text to a backend.