| Magic File Renamer 6.1

Index > Reference > Filters > Replacing Filters > Replacer Filter

This filter perform search & replace opeartion on names.

- Replace Text box
  - Here you should input the string you want to search for.
  - Should contain a regular expression if Use regular expressions is checked.
- With Text box
  - Here you should input the string you want use as a replacement for occurrences of the searched string.
  - You can leave the With text box empty, to strip (remove) occurrences of the searched string.
  - The With text box may contain a format string with formatting parameters.
- Match Case
  - When checked, only occurrences that matches the exact letters casing of the search string will be replaced.
- Replace only first occurrence
  - When checked, only the first occurrence of the search string in each name will be replaced.
- Replace only whole words
  - When checked, only occurrences of the search string which forms a whole word, will be replaced.
  - For an occurrence to form a whole word, the couple of characters before and after it should not be letters or digits.
  - This option cannot be combined with the Use regular expressions option.
- Use regular expressions
  - This option allows you to search for a pattern instead of a literal string and perform an advanced search and replace.
  - When checked, search string will be treated as a Regular Expression.
  - You will be able to use the menu buttons in the right side of the Search and With text boxes to input common regular expression tokens.
  - The With text box may contain "$n" tokens, if the search regular expression performs capturing.
  - If seacrch regular expression is not valid, the Replacer Filter will be disabled.
  - See Regular Expressions Reference for more details.
- Can be applied on any text field.

Examples:
Replace `"dog"` with `"cat"`, replace only whole words:
`The dogs ran away from the big dog >>> The dogs ran away from the big cat`
Replace `"\((.+)\)"` with `"$1"`, use regular expressions:
`aaa (bbb) ccc >>> aaa bbb ccc`