Find & Replace: Literal or Bounded JavaScript Regex
Preview counted literal or JavaScript-regex replacements in a bounded local Worker, with case, multiline and first/all controls.
Enabling local controls…
1. Local input and options
No uploads, saved input or URL parameters. Input/output: 1 MiB UTF-8 each. Workers stop after two processing seconds (load limit: 10 seconds). At most 10,000 matches per rule; output is complete or rejected.
A word boundary excludes neighboring Unicode letters, marks, numbers and underscores. Whole-word regex uses Unicode mode; patterns invalid in that mode are rejected.
Replacement dollar signs remain literal.
Literal replacements keep dollar signs literal; regex replacements use JavaScript $&, $1 and named captures. A two-second processing limit stops pathological patterns.
2. Preview and export
Enter input or load a sample, then run.
If clipboard access is denied, select output manually. Processing input changes cancel work and clear old exports.
How to use this tool
Enter text, search and replacement, choose literal or regex, set flags and run. Review the complete replacement before copying.
When not to use it
Literal replacements keep dollar signs literal; regex replacements use JavaScript $&, $1 and named captures. A two-second processing limit stops pathological patterns.
Read the guide →