Skip to content
WebKitool

Regex Tester

Test a regular expression against sample text with live highlighting and capture groups.

Loading tool…

Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.

How to use the regex tester

  1. Type your pattern, without the surrounding slashes.
  2. Set flags such as g (global), i (ignore case) and m (multiline).
  3. Paste test text below and read the highlighted matches.

About this tool

Regular expressions are best written incrementally, checking each addition against real text. This tester runs your pattern on every keystroke and lists each match with its index and capture groups, so you can see immediately when a change starts over-matching.

The flavour is JavaScript's, which is what runs in browsers and Node. Patterns written for PCRE, Python or Go mostly transfer, but lookbehind support, named group syntax and some escapes differ — test before you rely on a pattern in another language.

Common uses

  • Building a validation pattern for a form field.
  • Extracting fields from log lines.
  • Checking that a pattern does not match something it should ignore.

Frequently asked questions

Which regex flavour is used?
JavaScript (ECMAScript). Patterns run through the browser's own regex engine, so results match what your front-end or Node code will do.
Why does my pattern hang or feel slow?
Nested quantifiers such as (a+)+ can cause catastrophic backtracking on certain inputs. Simplify the pattern or anchor it so the engine fails faster.

Related tools