Contents › § 9

Regex tester

Type a pattern and some test text. Matches are highlighted as you type, and each match’s groups are listed below. Uses JavaScript’s regex engine.

Pattern
Flags
Test text
Matches

§ 9.1Flags

FlagEffect
gFind all matches, not just the first
iCase-insensitive
m^ and $ match at each line, not just the whole text
s. also matches line breaks
uUnicode mode: \u{1F600} and \p{L} work, emoji count as one character
ySticky: match only at lastIndex

§ 9.2Engine differences to watch

This tester uses JavaScript’s engine. Most syntax is shared with PCRE (PHP), Python and Java, but not all of it:

§ 9.3Catastrophic backtracking

Patterns like (a+)+$ can take exponential time on a string that almost matches, freezing a page or a server (a “ReDoS”). Avoid nested quantifiers over the same characters, and anchor patterns where you can.

§ 9.QQuestions

Do I type the slashes around the pattern?

No. Type only the pattern, and put flags in the Flags box.

Why does my pattern from Python not work?

A few features differ between engines — see § 9.2.

§ 9.RReferences

Last reviewed 2026-10-14.