Skip to content
FR
  1. LuzineDebug
  2. Tools
  3. Regex tester

Live regular expression tester

Test a regular expression live: highlighted matches, groups, replacement. Everything happens in your browser.

Cheat sheet

.        any character (except newline without s)
\d \w \s digit, word character, whitespace
[abc] [^abc]  one character in / not in the set
* + ? {2,5}   repetitions (add ? for the lazy version)
^ $ \b   start, end, word boundary
(…) (?:…) (?<nom>…)  capturing, non-capturing, named group
(?=…) (?!…) (?<=…) (?<!…)  lookahead / lookbehind

Frequently asked questions

Which regex flavour is used?

JavaScript (ECMAScript), with named groups (?<name>…), lookbehind (?<=…) and the u flag for Unicode. It is very close to PCRE (PHP) and Python for everyday use.

Why does my regex freeze the page?

Some patterns such as (a+)+$ cause catastrophic backtracking. Here the test runs separately and stops after 2 seconds, with a warning.

Errors this tool helps solve

Other tools