Enter a regular expression and test text, choose flags, and run the test.
Enter a regular expression (without surrounding / slashes), select the desired flags, and enter test text. Click Run test to inspect the total match count, start and end UTF-16 indices, numbered capture groups, and named capture groups. When Enable replacement preview is checked, the result box outputs the complete replaced text. Editing any input immediately invalidates the previous result.
CRLF and CR line endings in test text and replacement templates are normalized to LF ( ). When global matching encounters a zero-length match, the index advances automatically by UTF-16 code unit or Unicode code point. Replacement preview supports $& (full match), through (numbered capture groups), $<name> (named capture groups), and 16723 (literal dollar sign).
The date example uses named capture groups to extract year, month, and day and preview format conversion:
(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})Supports ECMA-262 JavaScript RegExp syntax only and does not emulate PCRE, Python, POSIX, or Go regex engines. Patterns are limited to 2000 UTF-16 code units, test text to 100000 UTF-16 code units, replacement templates to 10000 UTF-16 code units, matches to 2000 items per run, and output to 400000 UTF-16 code units. Any execution exceeding 1500 ms automatically terminates the worker thread to prevent catastrophic backtracking from freezing the page.
Regex matching and replacement run locally in a browser Web Worker without uploading, storing, or logging patterns or test text. Clearing only removes page references and does not erase system clipboard history.
MDN RegExpECMA-262Enter a regular expression without surrounding slashes and test text, choose flags, then click Run test. Enable replacement preview to inspect the full replaced text. Editing any input clears previous results; if complex backtracking occurs, click Cancel at any time to terminate the worker thread.