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
Matches
Matches are highlighted here.
How to test a regular expression
- Type your pattern and choose flags.
- Paste the text you want to test against.
- Review the highlighted matches and the capture group table.
- 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.
Related tools
- Find & ReplaceReplace text with plain matching or regular expressions.
- Text Diff CheckerCompare two texts side by side or inline.
- Case ConverterConvert to camelCase, snake_case, Title Case and more.
More in Encoding & Security.