About the Regex Find & Replace
The pattern runs on the RegExp engine of your browser and the replacement follows the rules of String.prototype.replace(): $1…$99 insert a numbered group, $<name> a named group, $& the whole match, $` and $' the text before and after the match, and $$ a dollar sign. A reference to a group that does not exist is left as written. With the g flag every match is replaced, without it only the first; m makes ^ and $ match at each line, s lets . match line breaks, i ignores case, u enables \p{…} and y matches only at the start position.
JavaScript itself does not read backslashes in a replacement. With Escapes in replacement the tool adds them, as text editors do: \n, \t, \r, \\, \xHH and \u{…} insert a character, \U and \L turn what follows into upper or lower case until \E, and \u and \l change only the next character, so _([a-z]) → \u$1 converts snake_case to snakeCase. Plain text searches for the characters as typed and takes the replacement literally; Whole word skips matches that are part of a longer word.
The search runs in a Web Worker with a limit of 1.5 seconds and 20,000 matches: a pattern with catastrophic backtracking such as (a+)+$ is stopped with a message and the page stays responsive. Matches of length zero (^, \b, x*) are handled like in JavaScript, one per position. The two previews mark the matches in the input and the inserted text in the output. The text never leaves your browser.
How to use it
- Paste the text into Input.
- Type the pattern without slashes and tick the flags, or click a recipe.
- Type the replacement; leave it empty to delete the matches.
- Check the highlighted previews and the number of matches.
- Copy or download the output.