Regex Literal Escaper

Escape text for literal matching in a JavaScript regular expression.

Scope: This produces pattern text only and never evaluates the resulting regular expression.

Workbench

Inputs stay on this page.