Advanced

Regex Flags Playground

Toggle each JavaScript regex flag on and off and watch, in plain English, exactly how it changes what matches.

/ /
Advertisement

About this tool

Unlike the Regex Tester, which is built for testing any pattern against any text, this tool is built for learning what each flag actually does. Use the preset buttons to load a pattern and sample text chosen to make one flag's effect obvious, then flip that flag on and off to see the highlighted matches — and the plain-English explanation below them — change in real time.