About the Regex Tester
Patterns run on your browser's own RegExp engine, so the results are exactly what str.match(), matchAll() and replace() return in JavaScript and Node.js. Other engines differ: PCRE (PHP), Python re and .NET support features like possessive quantifiers or inline modifiers that JavaScript does not.
Flags: g finds all matches, not just the first; i ignores case; m makes ^ and $ match at each line; s lets . match newlines; u enables full Unicode and \p{…} property escapes; y (sticky) only matches at lastIndex. The match table shows each match's index range, numbered groups and named groups from (?<name>…). The replace preview supports $1, $<name>, $& and $$.
Matching runs in a Web Worker with a 1.5-second limit and stops after 5,000 matches, so a pattern with catastrophic backtracking such as (a+)+$ is stopped with a message instead of freezing the tab. Invalid patterns are reported with the engine's own error message.
How to use it
- Enter the pattern without slashes.
- Tick the flags you need (g, i, m, s, u, y).
- Paste the test string and check the highlighted matches and the group table.
- Type a replacement to preview and copy the result.