Replacing with multiple rules

Using Multiple Replacement feature, you can process multiple text replacements at once in succession. The replacement rules can be stored as a named preset and reused when you need.

Use Multiple Replace window

You can open the Multiple Replace window to manage and process the multiple replacement in your document.

Manage replacement definitions

The stored replacement definitions that you created before are listed in the list on the left.

Export/import replacement definitions

You can export your replacement definitions to transfer them to another computer. Each replacement definition becomes a single CotEditor replacement definition file, which has a “.cotrpl” file extension and of which content is written in JSON format.

Process multiple replacement

The definition selected in the list on the left is shown in the editor area on the right side. The replacement rules in the editor area will be performed row by row from top to bottom at once.

Use the buttons at the bottom of the editor area to perform the multiple replacement.

* Beware that the matches by the “Highlight” command can be different from the replacement targets when you perform actual “Replace All,” because, on the Replace All, the succeeding rows are applied to the document that the previous rows above have already been applied to.

Edit replacement definition

You can create your own replacement definitions to process a multiple replacement.

Create new replacement definition

  1. Click the Add button + at the bottom of the list on the left side to create a new replacement definition.
  2. Click the Add button + in the editor area on the right side to create a new replacement rule.
  3. Input your desired replacement rule to the added row.

You don’t need to perform save after the modification because your changes will be saved automatically immediately during the edit.

A row with an invalid replacement rule will just be skipped when the replacement is performed.

Replacement rule options

OptionDescription
(checkbox)If the checkbox is turned off, the row will not be applied and just be skipped. You can use this option to keep a replacement rule that will optionally be used.
FindA string to search for. You cannot leave this field blank. When it is blank, the row will be ignored as it is invalid.
Replace WithA string to replace with. If you leave this field, the matches are just deleted.
RESearch with regular expression (abbreviation of Regular Expression).
ICIgnore character case on search (abbreviation of Ignore Case).
DescriptionYou can use this field to leave a comment about the rule. The description doesn't affect to replacement. This field can be left blank.

Advanced find options

You can customize the delicate find behavior during replacement from the advanced options panel. Those settings are also saved to your replacement definition and applied to all rules in the same replacement definition. Click the gear button in the Multiple Replace panel, then click checkboxes to change the behavior.

To learn about details of each option item, see Find and Replace.

See also