Skip to content

TEXT PATTERNS · LOCAL PROCESSING

Regex Tester

Test a JavaScript pattern, inspect its captures, then extract matches or preview a replacement.

Your source stays in this browser. Slow operations stop after 1.5 seconds of execution. Worker files may take up to 15 seconds to load.

1. Pattern and source

Enter the pattern without surrounding / delimiters. Uses your browser’s JavaScript engine; other regex flavours may behave differently.

Flags

Without g, only the first match is returned. Sticky matching starts at position 0. Choose u or v, not both. Unsupported flags produce a browser error.

Up to 1,000,000 UTF-16 code units; imported files up to 4 MB. Imported line endings stay intact until you edit the source; browser editing uses LF line endings.

Replacement template reference

$$ dollar sign · $& full match · $1 to $99 numbered capture · $<name> named capture · $` text before match · $' text after match. Replacement functions are not executed.

Add a pattern and source, then find matches.

Limits and matching behavior

Pattern:20,000 units · replacement template:100,000 · matches:20,000 · aggregate capture cells:200,000 · result strings:4,000,000 · replaced or extracted TXT:2,000,000 · JSON report:8,000,000 characters. Operations that exceed these limits fail with guidance; full results are never silently truncated.

The timer stops the worker, rather than predicting whether a pattern is safe. Results apply to this browser’s JavaScript engine, not PCRE, Python or every other engine.