Small ToolsAll tools
← All tools / Regex
Regex utility

Regex Tester

Test a regular expression against sample text and inspect matches.

● This tool runs entirely in your browser. Your input is never uploaded to our servers.

Use short sample text. Complex patterns can take a long time to run.

Output
Your result will appear here…

How to use Regex Tester

  1. Enter a JavaScript regular expression pattern and flags.
  2. Paste a short test string.
  3. Select Test to see matching text and positions.

Example

Input:

Order 42 includes 7 items.

Output:

Pattern: \d+
Matches: 2
42 (index 6)
7 (index 17)

Use cases

About this tool

Test a regular expression against sample text and inspect matches. Processing happens locally in your browser, so your input is not sent to a server or included in analytics.

Frequently asked questions

Which regular expression flavor is used?

The tester uses the JavaScript RegExp engine built into your browser.

What flags can I use?

Use JavaScript flags such as g, i, m, s, u, and y. Each flag can appear only once.

Is my sample text uploaded?

No. Pattern matching runs locally in your browser. Use short test strings because some patterns can take a long time to evaluate.

Related tools