DEV

Regex Tester

Enter a pattern, flags and some text to see every match this expression finds, with capture groups and positions.


        

How it works

This uses JavaScript's native RegExp engine — the same one your browser uses for everything else. The g (global) flag is applied automatically so every match is found, even if you don't add it yourself.

Supported flags

FlagMeaning
iCase-insensitive
mMultiline — ^ and $ match line boundaries
sDot matches newlines too
uUnicode mode
ySticky — matches only from the last index

Frequently asked

Why is my pattern showing as invalid?

JavaScript's regex syntax doesn't support every feature found in other languages (like PCRE lookbehind on older engines, or POSIX classes). The exact error message names what's wrong.

Does this match other regex flavors like PCRE or Python's re?

No — results reflect JavaScript's regex engine specifically. Most common syntax is shared, but some advanced features differ between languages.