Skip to content

Text & Query

Regex Tester

Test regular expressions against sample text in your browser. Invalid patterns cannot crash the page.

LocalProcessed locally — your pattern and text never leave your browser.

Available actions: copy, clear.

JavaScript RegExp in a Web Worker. Matching stops after 250 ms or 200 displayed matches.

Flags

Matches

Enter a pattern and test text, then choose Test.

How to use

  1. 1. Enter a JavaScript regular expression

    Type the pattern without surrounding slashes. Choose flags such as g, i, or m. Invalid patterns are caught and cannot crash the page.

  2. 2. Add test text

    Paste the string to search. Matching runs in a Web Worker with a timeout so a runaway pattern is stopped instead of freezing the tab.

  3. 3. Read matches and groups

    Each match shows its index and capture groups. Global search lists matches up to a display limit. Press Ctrl+Enter or Cmd+Enter to test.

Examples

  • Dates with capture groups

    Pattern (\d{4})-(\d{2})-(\d{2}) with flag g finds ISO dates and exposes year, month, and day groups.

  • Case-insensitive word

    Pattern hello with flag i matches Hello and HELLO.

Frequently asked questions

Does this regex tester upload my text?
No. The pattern and test string stay in your browser. Matching runs in a local Web Worker.
What happens if a pattern would freeze the page?
Matching is time-limited. If it exceeds the timeout, the worker is terminated and you see an error instead of a frozen tab.
Which regex flavor is this?
JavaScript RegExp only. It is not PCRE, .NET, or Python. Flags are the standard JS set: d, g, i, m, s, u, v, y.