Write a pattern and see what it matches as you type, with every match highlighted and its capture groups listed. Flags are toggles rather than something to remember the letters for, and an invalid pattern gets the engine's own error rather than silently matching nothing.
The pattern runs through your browser's own engine, so what you see here is exactly what your JavaScript will do. It is close to PCRE but not identical: lookbehind works in current browsers, named groups use (?<name>…), and there are no possessive quantifiers or atomic groups. Patterns written for Python or PHP usually transfer, but verify rather than assume.
Beyond finding every match, g makes the regex object stateful: it remembers where it stopped in lastIndex. Reusing one global regex across calls therefore produces the notorious pattern where every second call fails. This tool builds a fresh object each time, which is also the fix in real code.
Nested quantifiers over overlapping alternatives — (a+)+b is the classic — make the engine explore exponentially many paths on input that nearly matches. A few dozen characters can hang a thread for minutes. It is a real denial-of-service vector when patterns touch user input. Avoid nesting quantifiers, and anchor patterns so they fail early.
The pattern above is a reasonable practical filter, and it is not correct — the actual grammar in RFC 5322 permits quoted strings, comments and nested parentheses, and the complete expression runs to thousands of characters. The only reliable validation is sending a message and seeing whether it arrives. Use a loose pattern to catch typos, not to prove an address exists.
JavaScript's, which is what runs in your browser. It is close to PCRE but not identical — lookbehind is supported in current browsers, and there are no possessive quantifiers or atomic groups. Patterns written for Python or PHP mostly transfer, but not always.
Without it you get the first match only. With it, all of them. It also makes the regex object stateful through lastIndex, which is a classic source of bugs when the same object is reused across calls — this tool creates a fresh one each time.
Catastrophic backtracking. Nested quantifiers over overlapping alternatives, such as (a+)+b against a long run of a characters, make the engine explore exponentially many paths. Rewrite to avoid nesting quantifiers, or anchor the pattern so it fails fast.
Steuervergleich Kanton Zürich — Gemeindesteuern vergleichen (Deutsch)