# Find & Replace

The Replace function allows you to look for a certain string within filenames and replace it with another string.

- Look For - Enter the string you wish to search for. The following wildcards are allowed:

  - Matches zero or more characters: `*`
  - Matches one or more characters: `:`
  - Matches exactly one character: `?`

  Hint: Press the button with an eye icon (or hit F3) to open the Visual Assist window that allows you to visually select the text you want to find!

- Replace With - If the search string is found, it will be replaced with this string. You are allowed to enter <tags> here too!

  Hint: Leave this box empty to delete the search string!.

- Case Sensitive - If you want an exact match, check this one. Otherwise, for example "Flash" and "flash" will be interpreted as the same word. Use this if you for example want to change the character case within a single word.

- Swap Mode - Swap mode is a special case where, in addition to "Look" being replaced by "Replace", "Replace" is also replaced by "Look". In other words, the two search strings will be swapped. Note: Swap mode will be ignored if wildcards are used in the find box, since it is not logically possible to conbine the both.

- Skip - You can skip replacing the first # occurances the program finds. Enter 0 to incklude all occurances from the beginning.

- Count - You can limit the number of replaces to perform within each filename by entering a value here. Enter 0 for unlimited.

- Regular Expression - Enable this to turn on regular expressions in the find box (instead of just simple wildcards). RegExp is an advanced method for finding patterns in text. You can think of it like wildcards on steroids. For a reference on how to use regular expression in Flash Renamer, please read this page. RegExp in Flash Renamer supports capturing patterns. You can then use the captured patterns in the replace box by entering `$1-$9`. Here is an example:

  - Find: `(don)[ `ī]?(t)`

  - Replace: `$1'$2`

  Here, two patterns are captured, as indicated by the colors. This example is taken from the default batch replace list included in Flash Renamer It will match all of these: "dont" "don t" "don`t" "donīt", plus different caption variations, and replace it with "don't" in the same caption as the original!

  Although regular expressions look intimidating, they are actually quite easy to construct if you have a basic sense for logic. Take it easy and build them step by step. Remember that regexp are extremely logical, and if you don't get the result you expect you have probably made a mistake.

Problem: All your filenames have underscore "_" instead of spaces! Solution: Use the Replace function and enter "_" in the search box and " " (space) in the replace box to tidy up your filenames! (Note: Do not type the " characters.)

# Batch Replace

With Batch Replace you can run several Replace commands in one go! Use this for replace operations that you perform all the time. You can modify the list of replace commands from the Settings window. You can also add the current Replace function settings to the list by pressing the button with an exclamation mark! You can add multiple items at the same time if you use the Settings Window.

Note: By default the batch replace list is loaded with words that often need to be corrected! It is recommended that you go through the list before using this function, so you know what words are included.

Problem: You want to replace "Im" with "I'm", but not if it is part of another word, e.g. "Swimming". Solution: Add a space " " before and after both words, like this: " Im " and " I'm ".

Hint for Power Users The batch replace list is stored in a file called replace.dat in the Flash Renamer settings folder. It is a text file, and it is possible to edit it by hand in a text editor. It does however contain control characters to separate the various fields, so be careful not to mess up the file!