Skip to content
DevKOM

Regex Tester

Write a JavaScript regular expression and see every match highlighted in your test text, with capture groups, named groups and positions. Matching runs in a background worker with a time limit, so a runaway pattern can't freeze the page.

//g
Flags
Matches
Matches are highlighted here.

How to test a regular expression

  1. Type your pattern and choose flags.
  2. Paste the text you want to test against.
  3. Review the highlighted matches and the capture group table.
  4. Start from a common pattern in the examples list if you like.

Frequently asked questions

Which regex flavour is this?

JavaScript (ECMAScript 2024) regular expressions as implemented by your browser. Most syntax is shared with PCRE, Python and Java, but some features, such as possessive quantifiers, are not available.

What is catastrophic backtracking?

Patterns with nested quantifiers like (a+)+ can take exponentially long on some inputs. DevKOM stops matching after 2 seconds and warns you. Rewrite the pattern to avoid ambiguous repetition.

More in Encoding & Security.