
Enter a regular expression without the surrounding slashes, tick the flags you need, and paste your test text. Matches are highlighted as you type, and a table below lists every match with its position and capture groups. The tester uses your browser's JavaScript RegExp engine, so results are exactly what your JavaScript or TypeScript code will get. Your pattern and text never leave your browser.
g finds all matches instead of only the first. i ignores case. m makes ^ and $ match at every line. s lets . match line breaks. u enables full Unicode, including \p{L} property escapes. y (sticky) only matches at the position where the previous match ended.
Numbered groups ( ) appear as $1, $2… and named groups (? appear with their name. Turn on Replace to preview the result of text.replace(). You can use $1, $, $& (whole match) and $$ (a literal dollar sign) in the replacement.
Why do I see an error? The pattern has a syntax error, such as an unclosed bracket. The message from the browser tells you what is wrong.
Why are only 1000 matches shown? To keep the page fast, matching stops after 1000 results. Empty matches (for example from a*) are shown as a thin marker and never cause an endless loop.