Test JavaScript regular expressions live. Highlights matches, captures, and shows errors as you type.
Free online JavaScript regex tester. Test patterns, see matches and capture groups highlighted in real time. Supports flags and multi-line mode.
No. This tester uses JavaScript's RegExp, which is close to but not identical to PCRE. Notable differences, no lookbehind until ES2018, no atomic groups, and different Unicode property support. Test with the engine you'll actually deploy on.
g = global (all matches), i = case-insensitive, m = multi-line (^ and $ match each line), s = dotAll (. matches newlines), u = Unicode mode (correct handling of code points), y = sticky (match at lastIndex only).
Nested quantifiers on overlapping alternatives cause exponential backtracking (e.g. (a+)+b on 'aaaaaaaa!'). Restructure to use atomic-like patterns, anchors, or possessive qualifiers, or switch to a non-backtracking engine like RE2.