Skip to content
건강 앤 골프 · Tools
KO EN

Text Replacer

Replace all literal matches or all matches of a JavaScript regular expression and inspect the replacement count. This is useful for repeated terminology edits while comparing the output with the original.

Loading the tool. If it does not appear, reload this page.

How to use this tool

Enter source text, a search value and replacement text, then choose regex mode if needed. This implementation returns replacement text literally rather than expanding capture references such as $1.

Results and examples

Replacing cat with dog in cat cat performs two replacements and produces dog dog. Even in regex mode, a replacement of $1 inserts those characters rather than the captured group.

Limitations

  • Regex mode uses the global g flag without a separate choice of other flags.
  • Expensive patterns can slow long inputs; retain a copy and test a short example first.

Fields

FieldGuidance and constraints
Source textCheck the unit and format displayed beside this field.
FindCheck the unit and format displayed beside this field.
Replace withCheck the unit and format displayed beside this field.
Use regexCheck the unit and format displayed beside this field.
ResultCheck the unit and format displayed beside this field.

Data handling

Processing stays in the current browser tab; the site does not upload tool input for the calculation itself.

Sources

Frequently asked questions

How is the replacement count interpreted?

Replacing cat with dog in cat cat performs two replacements and produces dog dog. Even in regex mode, a replacement of $1 inserts those characters rather than the captured group.

Does $1 refer to a capture group?

Regex mode uses the global g flag without a separate choice of other flags. Expensive patterns can slow long inputs; retain a copy and test a short example first.

error: 우클릭 할 수 없습니다.