RegExp Find and Replace
Version 6.0
- MediaMonkey Add-on -

by Zvezdan Dimitrijević

This is information about the enhanced version of RegExp Find and Replace add-on for MediaMonkey v2.x-4.x. The freely available version of this add-on is already one of the largest MediaMonkey's add-ons that is the most powerful and flexible for finding and replacing metadata about media files. However, the enhanced version is more than two times larger and it has added many very useful options; among others the batch execution of presets and better organization of presets.


What is new

v6.0 - 2021-02-16

v5.2 - 2018-09-30

v5.1 - 2017-03-07

v5.0.3 - 2017-01-07

v5.0.2 - 2016-04-21

v5.0.1 - 2016-02-21

v5.0 - 2015-11-03

Installation

Note: The RegExpReplace.ini file in Auto folder is used only after installation. During its work, the RegExp Find & Replace add-on stores presets into the MediaMonkey.ini file.

If you are upgrading this add-on from an old version, it is strongly recommended that you follow these steps:
1. make a backup of your own created presets using the Edit / RegExp Export/Import dialog box (pre-v4.4), or Edit / RegExp Find and Replace / Manage Presets dialog box (v4.4 or higher);
2. uninstall the old version of the add-on and choose Yes when you are asked if you want to remove add-on settings;
3. install the new version of the add-on;
4. import your own created presets using the Edit / RegExp Find and Replace / Manage Presets dialog box.

This way, you will always have the latest and updated presets correctly sorted. If you don't remove the old settings (together with presets), this add-on will check the names of presets during the installation and, if they are same as the old ones, they will be skipped or relocated.

Usage

Using this add-on is very similar to the older versions of the add-on with some additions. The RegExp Find and Replace add-on could be used by beginners as well as by very advanced users:
1. Beginners could use the add-on by just applying the presets from the menu. You could find 550+ predefined presets for different tasks that could be useful for you without any additional adjustment, e.g. you could clear field, copy conditionally full or part of one field to another, swap the first and the last name of Artist, ... However, many of these presets can be adjusted in a dialog box that contains one or more different controls depending on the tag(s) used in the selected preset. For example, with the preset "Replace specified string with another one in <Into Field>" you could set 3 parameters: Destination field, String to replace and Replace with.

RegExpReplace-5.0-04

The presets could be very simple like the one just mentioned, but also very complex like the preset "Move right-specified part of <Into Field> between (and including) specified strings to +/- specified word position".

RegExpReplace-5.0-05

If you modify some parameter in the adjustment dialog box and confirm execution of the preset with the OK button, that modification will be remembered in the corresponding preset.

2. Somewhat more experienced users could create their own presets to do some frequent data manipulations that are different than those that are included with the add-on. You could use the Edit > RegExp Find and Replace > Preset Settings dialog box to find/replace data in files as you could do in any text editor, but you could also use the same dialog box to create/edit presets. Such presets could be applied from the mentioned dialog box, but they are also directly accessible using the corresponding menus, hotkeys and/or toolbar buttons.

The replacing presets started by menu/hotkey/toolbar will be applied to the files selected in the main filelist or Now playing panel, depending of that which panel is active. The new version of the add-on also has ability to show/select files using presets from menu/hotkey/toolbar, and in that case the presets will be applied on all files that are visible in the filelist or Now playing panel.

Menu
You could open the add-on's dialog boxes and apply its presets using the RegExp Find and Replace menu items located in the main Edit menu and popup menus of the main filelist and Now playing panel. You could also get the same menu if you click on the RegExp Tagging Presets toolbar button (light bulb) located on the Search toolbar [MM2-3] or RegExp Find and Replace toolbar [MM4] if the Show the toolbar button for the RegExp Tagging Presets menu option is turned on in the Options dialog box.

RegExpReplace-6.0 - Menu

The following items are available in menus:
  • Preset Settings - use this command if you want to open the RegExp Find and Replace / Preset Settings dialog box that allows finding/replacing metadata in files/database and creating/editing presets; this command is always visible in the Edit menu and popup menus of the filelist/Now playing panel, it is also visible in the RegExp Tagging Presets toolbar menu (light bulb) if the Show the toolbar button for the Find & Replace dialog box option is turned off in the Options dialog box, i.e. when its toolbar button is hidden.

  • Manage Presets - this command opens the Manage RegExp Presets dialog box that contains a table with all available presets and it allows batch operations on several presets at the same time, e.g. Delete, Export or Import. It also has some other commands that are better used when the presets are displayed in the tabular form, e.g. Find for searching of some specific preset.

  • Options - when you choose this command you will get opened the RegExp Find and Replace Options dialog box that contains less important options that affect behavior of the add-on and/or all presets in general.

  • Last Executed Presets - this menu contains a list of the last executed presets with 10 levels deep history.

  • Favorite Presets - this menu contains a list of presets that have turned on the Favorite option in the Preset Settings dialog box.

  • Unclassified Presets - this sub-menu is visible only if there are presets that don't have an assigned Menu argument.

  • Batch Presets - this sub-menu displays all presets that are assigned to a batch group using the Batch option with the specifyed batch group using the Menu argument of the preset.

  • The remaining menu items represent the groups of presets that have assigned the Menu argument, e.g. the predefined Basic manipulations sub-menu. If you choose an item from those sub-menus, you will start execution of the corresponding preset.

    RegExpReplace-6.0 - Preset Settings

    RegExp Find and Replace / Preset Settings
    The Preset Settings dialog box allows finding/replacing metadata in files/database and creating/editing presets. This dialog box is resizable, so you could enlarge it, e.g. if you cannot see the content of some control.

    RegExpReplace-6.0 - Preset Settings_1

    Preset
    The first group of controls, at the top of the Preset Settings dialog box, is mainly about settings how the selected preset is seen and accessed within the program (user interface). Firstly, we have the Preset label showing the number of the selected preset and total number of presets and next to it we have a combo box which contains a list of all stored presets. You could select some specific preset from that list and after that you could apply it to the selected files or you could modify its settings to suits your needs. That control also allows you to enter a name for the new or existing preset. It is possible to have two or more presets with the same name only if they belong to different menu groups (set with the Menu option).

    RegExpReplace-6.0 - Choose Preset

    ... (Choose RegExp Preset)
    Using the Preset combo box to search for a particular preset that you want to load could be very tedious task since that list could contain 500 or more items. That problem could be avoided using the "..." button that is located on the right side of the Preset combo box. If you click on it, you will get opened the Choose RegExp Preset dialog box that is similar to the Manage RegExp Presets dialog box containing the table with all available presets. You could find a preset in that table that contains the wanted text if you type it in the Find text box. All presets that contain the wanted text will have ticked check boxes on the left side of the table. You could jump to the next or previous preset that contains the specified text using the Next and Prev buttons. With the Match case and Regular expressions check boxes you could further refine the searching results.

    If you have turned on the Modeless option in the Options dialog box, when you click on the row in the table, the corresponding preset will be immediately displayed in the Preset Settings dialog box. And vice versa, if you select a preset in the Preset combo box in the Preset Settings dialog box, the corresponding row will be selected in the Choose dialog box. However, if you have Modeless option turned off, after you select the wanted mask in the Choose dialog box, you need to confirm that using the OK button and that dialog will be closed.

    Move, New, Update / Rename, Add, Delete
    Next to the "..." button we have Move up/down buttons, which allow us to move a selected preset up or down in the list. Then we have 4 buttons for manipulation of presets: New, Rename/Update, Add and Del. The New button resets all controls in the dialog box to their initial (blank) states, which could be used when we want to create a new preset from scratch. The following button could be used if you want to save the currently selected preset and it has two alternate captions depending of the modifications made in the dialog:
    1. Rename - if you change only the preset name and leave all other preset parameters unchanged;
    2. Update - if you change any parameter (e.g. Description).

    The Add button allows adding of the currently displayed preset to the list of presets stored in the MediaMonkey.ini file. That button is enabled only if you have created a new preset (after the click on the New button) or if you have modified the Preset, Menu or Batch option of an existing mask. That means that you cannot have two or more presets with the same name under the same menu group. The next button is Del that could be used when you want to remove the selected preset from the list permanently, so be careful using it.

    RegExpReplace-6.0 - Tune Preset_1

    Tune preset
    The last button in that row is Tune. If you click on it, you will get the Tune preset dialog box that allows fine adjustment of preset parameters represented with the corresponding tags in the Find what/Replace with strings without messing with their long and complicated strings. The Tune dialog box is similar to the one that you could get when you start a preset using menu/hotkey/toolbar, with only difference that the preset will not be applied when you click on the OK button in the Tune dialog, but it will get modified tags accordingly. However, even if you click on the OK button in the Tune dialog box, you still need to save modification of the preset using the Update/Add button.

    The OK button in the Tune dialog box is visible only if you have the Modeless option turned off in the Options dialog box. In that modal mode you cannot continue working with the Preset Settings dialog box and the rest of the program until you close the Tune dialog. However, if you have turned on the Modeless option in the Options dialog box, you will be able to edit the preset using both the Preset Settings and Tune dialog boxes at the same time without a need to close the Tune dialog - the changes in one dialog box will be automatically reflected in another dialog.

    RegExpReplace-6.0 - Settings+Choose

    Opening all three mentioned dialog boxes next to each other in modeless mode, Preset Settings, Choose Preset and Tune Preset, allows much easier and faster navigation and editing of the presets.

    Description, Batch, Menu
    The first control in the next row is the Description text box which could be used to enter any information about the selected preset, e.g. to describe its effect with some examples. The description will be also displayed as a hint if you hover a mouse over the corresponding menu item or toolbar button of the preset.

    The Batch check box should be ticked on if you want to assign the selected preset to a batch group. All presets that belong to the same batch should have the same Menu name which will appear in the Batch Presets sub-menu. When you choose any batch from that sub-menu, the presets that belong to it will be applied in the same order as they are sorted in the list of presets.

    Keep in mind that all presets inside one menu group should have unique names, even the presets assigned to the batch groups. So, if you want to assign a single preset to the same batch group two or more times, you should save that preset with different names for each needed instance. For example, if you want to apply the "Capitalize <Into Field>" preset to two or more fields using a single batch, you could add e.g. "Capitalize Artist", "Capitalize Title", and so on, presets to that batch. Of course, you should also adjust appropriately the destination field for each preset before saving it.

    If you have turned on the Show dialog box for adjusting of the preset selected in the menu or toolbar option in the Options dialog box, after you start execution of a batch, the adjustment dialog box will contain only the dropdown lists for source/destination fields of individual contained presets, but the other tags of individual presets will be substituted with their default values. This means that all presets assigned to batches should have all parameters already set using the corresponding tags in the Find what and Replace with strings in the Preset Settings dialog box.

    You could specify in which menu group you want to put the selected preset using the Menu combo box. You could choose an existing menu group or you could create a new one by typing its name. If you leave that box empty, the selected preset will be put in the Unclassified Presets sub-menu. The same combo box is used to specify the name of the batch group if the Batch check box is ticked on. Such batch group will appear in the Batch Presets sub-menu and you could select the corresponding menu item to start execution of that batch of presets.

    Favorite, Icon, Hotkey
    If you have a preset that you use very often and if you want to apply it without searching for it in the menu, you could mark it using the Favorite check box and such preset will be added to the Favorite Presets sub-menu. Also, you could choose if and how you want to get the favorite presets displayed in the toolbar using the options under the label "Presets having the Favorite option turned on in the Preset Settings dialog box:" in the Options dialog box.

    If you have the option "Show as separate toolbar buttons" turned on, you will get displayed individual toolbar buttons for each favorite preset, so you could just directly click on these buttons to start their execution. If you have the option "Show in Favorite Presets toolbar menu" turned on, you will get displayed one toolbar button that shows a dropdown list of favorite presets when you click on it. This second option is preferred if you have a lot of favorite presets, but you don't want to have too many displayed toolbar buttons.

    The toolbar buttons of this add-on are displayed on the Search toolbar in MM2-3 or in the RegExp Find and Replace toolbar in MM4. By the way, you need to click on the Update button to confirm any modification of the preset's settings, even if you just toggle the state of the Favorite check box.

    If you have displayed individual toolbar buttons for each favorite preset, they could show a textual caption with the name of preset or an icon. Since the preset names are very long, their captions could be trimmed to the specified number of characters using the option Trim the caption of toolbar buttons (maximal number of characters) in the Options dialog box.

    If you want to pack even more buttons on the toolbar, you could use the icons instead of the textual captions. You could assign the icon to the selected preset choosing it from the Icon dropdown list and that icon will be displayed in the presets menu and on the corresponding toolbar button. The icon could be loaded from an external .ico file or you could choose any internal MM's icon represented by its number (the built-in icons for the Glided skin with their numbers could be downloaded from here). The external .ico file could be specified after clicking on the same Icon combo box when the mouse pointer looks like a pointing hand. If you want to remove icon from the preset, i.e. to get the textual caption back on the toolbar button, you should choose the first (empty) item from the Icon dropdown list.

    If you prefer the keyboard over the mouse, you could start execution of a preset by pressing a hotkey. To be able to do that, you need to assign the hotkey to the selected preset using the Hotkey text box, e.g. you could specify Shift+Ctrl+T.

    RegExpReplace-6.0 - Preset Settings_2

    Finding group
    The following controls in the Preset Settings dialog box describe how the selected preset should perform. The first control in the next (finding) group is the Find what combo box/text box which is used to specify the string that we want to search for. The same control is used to specify the string that will be replaced in the destination field if the inverted mode is turned off using the Invert check box (more about it latter). The Find what combo box has a dropdown list with the history of the last 5 applied search strings.

    The button and dropdown control, which are on the right side of the Find what combo box, could be used to insert the predefined text to the Find what combo box. The items in the list depend on the other preset settings, e.g. if Regular expression (F.) is ticked on, that list will contain Entire, Empty, Filled, Begin and End items, but if the VBScript (F.) is ticked on, it will contain Field, <From>, <Into>, <Str.> and < Num.> items. Those controls are not enabled if both Regular expression (F.) and VBScript (F.) are ticked off. With a click on that button you will insert the corresponding text into the Find what string, e.g. with the Entire item you will get the "^.*", which is the Regex replacement for the full content of the field.

    The next combo box has two meanings, depending on the inverted mode set by the Invert check box: if the inverted mode is turned off, its label will display Into and with it we could specify the destination field that could be searched and modified; if the inverted mode is turned on, its label will display From and with it we could specify the source field only for searching.

    The items in the Into/From dropdown lists represent the MediaMonkey fields that are available for searching/modification with this add-on and many of them have corresponding tags that are stored inside media files.

    In general, the presets could be applied only on one destination field at once. However, the first item in the Into list (All Text Fields) is specific and it allows modification of several textual fields at once using the same replacement. You could specify which text fields you want to modify using settings in the Search sheet of the Options dialog box [MM3.1+], but please be careful with that option, especially with the specified Path field!

    There are also two another ways to manipulate several (unrelated) fields at once. You could do that using several presets that will be applied in sequence if you have put them in a batch. And it is possible to write a single preset that could modify two or more fields at once, but you need to have a good VBScript knowledge to do that (please take a look at the "Swap <From Field> and <Into Field>" preset as an example).

    The first combo box in the next row has several items that determine the type of information displayed in the following info box that is below the Find what control:
  • Old <Into> displays the old content of the destination field specified with the Into combo box, i.e. the content before the applied replacement (the Original info in old versions of the add-on);
  • Old <From> displays the content of the source field specified with the From combo box when it is applicable (i.e. when the corresponding Regular expression or VBScript check boxes are ticked on) and it also displays the old content of the source field before the applied replacement with presets that modify both source and destination fields, e.g. "Swap <From Field> and <Into Field>" (the Replacement info in old versions of the add-on);
  • New <Into> displays what would be the new content of the destination field specified with the Into combo box, i.e. the content after the applied replacement (the Result info in old versions of the add-on);
  • New <From> displays what would be the new content of the source field specified with the From combo box, i.e. the content after the applied replacement with presets that modify both source and destination fields (it displays the same content as Old <From> with the presets that modify only the destination field);
  • (F) decode displays the Find what string with the adjustment tags replaced by graphical characters, which could help in analyzing of long string with many tags;
  • (F) w/ <.> displays the Find what string with the number/string adjustment tags replaced with their specified values and all If/Else/EndIf conditional tags appropriately removed; you could use text displayed with this option if you want to modify a preset having stripped all tags;
  • (F) w/o <.> displays the similar text as the previous one, but also <Into> and <From> tags will be replaced with the corresponding MM fields.

    The Regular expression (F.) check box should be ticked on if you want to use regular expressions in the Find what string. The VBScript (F.) check box is enabled only in the inverted mode set by the Invert check box and it should be ticked on if you want to use VBScript conditions in the Find what string that determine if/when the replacement should occur.

    The Find whole words only check box should be ticked on if you want to search only for whole words (otherwise any field text that contains the specified Find what string will be matched). It could be used only when the Regular expression (F.) is ticked off, since the regular expressions have their own way of finding whole words.

    Match case
    The previous three check boxes determine behavior of the string specified with the Find what control, while the next Match case check box determines behavior of both Find what and Replace with strings. It should be ticked on if you want to search and/or replace only parts of the string with the exact same case, e.g. if you want to find "i" but not "I".

    RegExpReplace-6.0 - Preset Settings_3

    Replacement group
    The first control in the next (replacement) group is the Replace with combo box/text box which could be used for specifying a string that we want to use for the replacement. Similarly to the Find what combo box, that control has a dropdown list with the history of the last 5 applied replacement strings. The button and dropdown control that are next to the right side of the Replace with combo box have the same purpose as the similar controls on the right side of the Find what combo box, i.e. they could be used to insert a text to the Replace with string, depending on the chosen item from the dropdown list and the Regular expression (R.) and VBScript (R.) settings.

    The next combo box has two meanings depending on the inverted mode set by the Invert check box, similarly to the combo box that is on the far right side of the Find what combo box. If the inverted mode is turned off, its label will have displayed From and is enabled only if the Regular expression (R.) or VBScript (R.) are ticked on. If the Regular expression (R.) is ticked on, then you could use the From list to specify the source field for the replacement. However, if the VBScript (R.) is ticked on, then you could use the From list to select a field which you want to paste into the Replace with string using the previous button and dropdown list, or you could choose the field which will be substituted instead of the <From Field> tag that you could have specified inside of the Replace with string (please read the Adjustment section regarding the <From Field> tag). If the inverted mode is turned on, the label of the mentioned combo box will have displayed Into and with it we could specify the destination field that will be modified.

    The leftmost combo box in the next row has several items that determine the information displayed in the following info box that is below the Replace with control. The fist four items have the same behavior as the items in the similar combo box below the Find what control: Old <Into> (Original), Old <From> (Replacement), New <Into> (Result), New <From>. The remaining three items, (R) decode, (R) w/ <.> and (R) w/o <.>, have the similar purpose as the items (F) decode, (F) w/ <.> and (F) w/o <.> in the previous combo box, but instead of Find what string they will display the modified Replace with string.

    You should tick on the Regular expression (R.) or VBScript (R.) check boxes if you want to use the corresponding expressions in the Replace with string.

    Invert, Action
    The Invert combo box should be ticked on for the so-called inverted mode when you could find something in one (From) field and use matched string to replace data in another (Into) field (in the freely available version of the add-on it was possible to replace data only in the same field that is also used to find data). This option is experimental and maybe I will change it in the future.

    The Action combo box determines what will happen if you start some preset by menu/toolbar/hotkey. With the freely available version of the add-on, that action is always the same as when the Replace All button in the Preset Settings dialog box is applied to the files selected in the main filelist. However, with the Action option you could set another action that will be applied:
  • Replace in all selected files - the same as before;
  • Replace in currently playing - if you want to apply the replacement to the currently playing file;
  • Keep files with matched tags - the same effect as when using the Keep matched button on the bottom of the Preset Settings dialog box;
  • Select files w/ matched tags - the same as Select matched;
  • Keep files w/ unmatched tags - the same as Keep unmatched;
  • Select files w/ unmatched tags - the same as Select unmatched;
  • Keep files w/ replaceable tags - the same as Keep replaceable;
  • Select files w/ replaceable tags - the same as Select replaceable;
  • Keep files w/ irreplaceable tags - the same as Keep irreplaceable;
  • Select files w/ irreplaceable tags - the same as Select irreplaceable.
    The effect of the corresponding buttons to those actions will be described latter.

    RegExpReplace-6.0 - Preset Settings_4

    File list
    The table on the bottom of the Preset Settings dialog box shows 25 files surrounding the current file. It displays the old and new content of the chosen destination field in these files. The number of files shown in the table could be adjusted in the Options dialog box using the option Maximal number of table rows in the Preset Settings dialog box. Each row in the table has a check box in the first column; if that check box is ticked on, the corresponding file will be modified when using the Replace or Replace All button. With the check box on the left side of the table header you could tick on/off all files in the table.

    The context menu of the table contains options that determine which column(s) will be displayed in the table: Path and From Field. The Path option always displays the Path of the files, as it was the case with the old versions of the add-on. The From Field option could display the old/new content of From field, which is useful with the presets that modify both source and destination fields at once, e.g. many "Move..." presets.

    RegExpReplace-6.0 - Preset Settings AltMode

    "^" / "_" (toggling dialog mode)
    The first button on the bottom of the Preset Settings dialog box toggles the visibility of controls in that dialog and it has two possible captions: "^" and "_". If the Settings dialog box contains all previously mentioned controls, that button has the "^" caption. However, if you click on that button it will have the "_" caption, while almost all other controls from that dialog will be replaced by two large multi-line text boxes in which you could type the Find what and Replace with strings, which is useful with long strings. If you click on the "_" button, all other controls from the Settings dialog box will be displayed again and the two mentioned multi-line text boxes will be replaced with the combo boxes.

    ? (Quick reference)
    If you click on the next "?" button you will get the short reference for the Regular expressions and custom VBScript functions used in this add-on, which will be displayed instead of the mentioned table with files; if you click on the same button again, that file table will return.

    Selection of file in the table
    The number of the current file (on which you could apply the Replace option) is displayed in the text box in the left-bottom corner of the dialog box and the field's content of that file is displayed in the previously mentioned info boxes that are below the Find what and Replace with combo boxes. The first up/down buttons next to that text box serve to change the current file in steps by one, while the following up/down buttons change it in 25 steps, i.e. one page up or down in the table.

    The next button (which looks more like a text box) displays the total number of files that are selected/visible in the main filelists. If you click on that button you will toggle between selected and visible files. That means that you could apply the preset on all visible files without selecting them all in the filelist.

    Find, Replace
    The Find Next/Find Prev button could be used to locate the next/previous file that matches criteria specified with the controls in the finding group and that file would become the current one. The searching direction could be set with the arrow button that is next to the mentioned button.

    The Replace button could be used to apply the selected preset to the current file; after that, the next/previous file that matches the specified criteria becomes the current file. The Replace All button could be used to apply the selected preset to all files that are selected/visible in the main filelist (be very careful when doing that).

    Keep/Select files in the main filelist
    The last button at the bottom row before the Close button has several possible actions which could be chosen from the list after clicking on the part of button with the down arrow: Keep matched, Select matched, Keep unmatched, Select unmatched, Keep replaceable, Select replaceable, Keep irreplaceable and Select irreplaceable. None of those options modify fields/tags in files, but they could show which files have fields that could/couldn't be found/modified using the selected preset.

    If you choose any of "Keep ..." options, you will get removed all files from the main filelist that don't satisfy the selected option. For example, if you choose Keep replaceable option, it will display only files that could be surely modified if you apply the Replace All option when using the selected preset. Similarly, if you choose any "Select ..." option you would get selected files in the main filelist that satisfy the selected option without removing other files.

    RegExpReplace-6.0 - Manage Presets_1

    Manage RegExp Presets
    The Manage RegExp Presets dialog box is similar to the mentioned Choose RegExp Preset dialog box with the same Find options for searching presets, but it also contains several additional controls that allow some operations on the preset(s) selected/checked in the table. There are two radio buttons on the top of the dialog box: MediaMonkey.ini and File. If you select the MediaMonkey.ini option, you will get displayed all RegExp presets that are stored in the main MediaMonkey INI file, i.e. the presets that are displayed in the RegExp menus. In this case, you will be able to export/import presets from/to the MediaMonkey.ini file, as well as to add/edit, delete or move them.

    If you choose the File option, you could get displayed presets from an external INI file, which could contain e.g. your previously exported RegExp presets. You could type its path in the following text box or you could click on the "..." button and find that .ini file in the new Open File dialog box. Using this option, you will be able to export/import presets from/to the specified .ini file, as well as to delete or move them (if the loaded .ini file is not marked on open as read-only).

    Selecting/checking of the preset(s) on which you want to implement an operation could be done in two ways: you could use the check boxes located on the left side of the table or you could select the wanted preset directly in the table. When using the second way, you could select only one preset at the time and that way has a precedence over the first one, i.e. even if you have some or all presets checked on in the table, if you choose an operation as Delete, it will be applied only on the selected preset, but not on the checked ones.

    If you want to deselect the currently selected preset, e.g. if you want to do an operation on the checked presets, then you should click again on the already selected preset to deselect it. The topmost check box could be used to toggle all individual check boxes on or off if none preset is selected. However, if any preset is selected, the topmost check box could be used to deselect that preset.

    If you want to select multiple consequent rows at once, firstly click on the check box of the first row in the range to tick it on or off, then press Shift key and without releasing it click on the check box of the last row in the range.

    You could sort all presets and/or menu groups to which they belong using the Sort by dropdown list, which has several options for sorting:
  • preset number - the presets will be sorted by their serial number in the .ini file (default);
  • menu position - the presets will have the same positions as the corresponding items in the menu, i.e. the order of presets in the list will be seamless inside their groups following the same order as it is in the menus, which could be handy to keep presets sequential, because when creating a new preset it will be placed on the end of the list, but not after the last preset from the same menu group;
  • name in menu - the menu groups will keep their existing order, but the contained presets will be sorted alphabetically by their names inside each group;
  • menu and name - the menu groups will be sorted alphabetically and their contained presets will be sorted as well by their names inside each group;
  • name only - the presets will be sorted alphabetically by their names, without regard on the name of menu groups to which they belong.

    Let say that I have the next order of presets in the .ini file (yes, the presets could be unsorted in .ini file):
    Preset2=Menu_A\Name_C
    Preset1=Menu_B\Name_B
    Preset3=Menu_B\Name_A

    - sorting by the preset number will produce:
    Menu_B\Name_B (Preset1)
    Menu_A\Name_C (Preset2)
    Menu_B\Name_A (Preset3)

    - the menu position will produce:
    Menu_B\Name_B (Preset1)
    Menu_B\Name_A (Preset3)
    Menu_A\Name_C (Preset2)

    - the name in menu will produce:
    Menu_B\Name_A (Preset3)
    Menu_B\Name_B (Preset1)
    Menu_A\Name_C (Preset2)

    - the menu and name will produce:
    Menu_A\Name_C (Preset2)
    Menu_B\Name_A (Preset3)
    Menu_B\Name_B (Preset1)

    - the name only will produce:
    Menu_B\Name_A (Preset3)
    Menu_B\Name_B (Preset1)
    Menu_A\Name_C (Preset2)

    After choosing the sorting method from the Sort by dropdown list, the presets will be sorted only in the table. If you click on the table header that contains displayed the information about loaded presets, the chosen order will be permanently applied to the .ini file. This operation is not reversible, so be careful using this option and make a backup of your presets first. Before you choose option for permanent sorting of presets, you should know that the order of presets in the list is important for the execution of batches. The batches execute their containing presets in the same order as they are placed in the list. So, if you sort the list of presets alphabetically, you could get an unwanted order of presets inside batches!

    On the right side of the table header is located the Word wrap check box that could be used to toggle the way how the presets will be displayed in the table.

    The Find text box and the Next/Prev buttons on the bottom of the Manage RegExp Presets dialog box have the same function as the same controls in the Choose RegExp Preset dialog box, i.e. to find the presets in the table that contain the specified text.

    The Move operation could be done only on a single selected preset at the time. Using the Up and Down buttons, you could move the selected preset in the appropriate direction in the list of presets. Those two buttons have the auto-repeat possibility, i.e. it is enough to click on any of them and the selected preset will continue to move in the table until you release that button.

    RegExpReplace-6.0 - Edit Preset

    The next button in the Manage RegExp Presets dialog box has two possible captions: Add and Edit. It will have the Add caption if you don't have any preset selected in the table; if you click on that button, you would get opened the Add RegExp Preset dialog box that is the same as the Edit RegExp Preset dialog box, but it contains all controls set to their initial (blank) state and it allows adding of a new preset to the list of presets.

    If you select any preset in the table, the mentioned button will have the Edit caption; if you click on that button, the Edit RegExp Preset dialog box will open (which is very similar to the Preset Settings dialog box); in this case all controls in that dialog box will be set accordingly to the selected preset, which means that you could modify the existing presets from the Manage RegExp Presets dialog box. You could also open the Edit RegExp Preset dialog box if you click the serial number of preset displayed in the "#" column of the table.

    You could use the Delete button if you want to remove the selected/checked preset(s) from the .ini file permanently, so be careful using it.

    The Save and Load buttons are similar in effect to the Export and Import buttons. The main difference is that when using the Export and Import you will be asked for the name of the target/source .ini file. On the other side, the Save and Load commands are as a kind of the Copy/Paste options, they use the intermediary file (RegExpReplacePresets.ini) without asking for the name of a file. The Export command is the same, more or less, as in the previous versions of the add-on, i.e. it allows exporting of the selected/checked preset(s). However, it is now possible to use that same command to export presets not only from the MediaMonkey.ini file, but also from the .ini file specified in the File text box (if that option is selected), i.e. you could now export files from one external .ini file to another .ini file. The same apply to the Save command, which could be used to save presets from the MediaMonkey.ini file or from the external .ini file, depending on the two topmost radio buttons.

    Similarly, the Import command in the previous versions of the add-on allowed import of presets only from the external .ini file, specified in the File text box, to the MediaMonky.ini file, when the File radio button was selected. However, the new version of the add-on allows import of presets either to the MediaMonkey.ini file or to the external .ini file, depending on the two topmost radio buttons, which determines the target of import. The same apply to the Load command.

    If you have selected any preset in the table, the imported/loaded presets will be inserted before the selected preset in the table, i.e. at the same position. However, if you want to import/load presets to the end of the list, you should not have any preset selected in the table.

    If you choose the Import command, you will get imported all presets that are contained in the .ini file specified in the new Open dialog box. However, if you want to import only particular preset(s) from that .ini file, you cannot use the Import command, but you need to use the next two operations:
    1. choose the source .ini file using the MediaMonkey.ini or File option, select/check the wanted presets and choose Save command;
    2. choose the target .ini file using the MediaMonkey.ini or File option, select the position in the table where you want to import the presets and choose Load command.

    RegExpReplace-6.0 - Manage Presets_2

    If the Manage RegExp Presets dialog box is horizontally too narrow, one spin control will be displayed instead of two Next/Prev buttons, another spin control will be displayed instead of two Up/Down buttons and the Export and Import buttons will be displayed just as the "..." buttons next to the Save and Load buttons. In that case, be careful not to use the Save button instead of the following "..." button if you want to export presets to the external .ini file, because they will be saved only temporarily to the intermediary file.

    RegExpReplace-6.0 - Options

    Options
    The RegExp Find and Replace Options dialog box contains some less important options that affect behavior of the add-on and/or all presets in general. You could open this dialog box more than one way:
    1) if you choose the Options command in the RegExp Find and Replace sub-menu of the File menu, the RegExp Tagging Presets toolbar menu (light bulb) or the context menus of the main filelist and Now Playing panel, or
    2) if you select RegExp Find and Replace add-on in the Tools / Extensions dialog box and click on the Options button.
    The same options could be found on the General / RegExp Find and Replace page in the Tools / Options dialog box.

  • Confirm update/delete of the preset selected in the Preset Settings dialog box: if you turn off this option you will not be asked if you want to update or delete presets in the Preset Settings dialog box.

  • Confirm execution of the preset selected in the menu or toolbar: if you turn off this option you will not be asked if you want to apply the preset that you have started by toolbar/hotkey/menu.

  • Show dialog box for adjusting of the preset selected in the menu or toolbar: if you turn off this option the adjustment dialog box will not be displayed for the preset that you have started by toolbar/hotkey/menu.

  • Delete emptied folders when moving files as a result of the Path modification: you should turn on this option if you want to delete folders that are left empty after moving files as a result of the applied presets that modify the Path field.

  • Maximal number of table rows in the Preset Settings dialog box: you could set the maximum number of rows in the table of files in the Preset Settings dialog box using this option, keep in mind that the large number of displayed rows slows down the add-on.

  • Show the toolbar button for the Preset Settings dialog box: if you turn off this option the toolbar button that opens the Preset Settings dialog box will not be displayed.

  • Show the toolbar button for the RegExp Tagging Presets dropdown menu: if you turn off this option the toolbar button that shows RegExp Find and Replace sub-menu in the toolbar will not be displayed.

  • Show the toolbar button for the last executed preset from menu or toolbar: if you turn off this option the toolbar button that starts execution of the last applied preset will not be displayed.
  • Presets having the Favorite option turned on in the Preset Settings dialog box: if you turn off the next two options, you will not get displayed the toolbar buttons for any preset, even if any of them have the Favorite option turned on.
  • Trim the caption of toolbar buttons (maximal number of characters): you could set the maximum number of characters that should be displayed on the toolbar buttons of presets.

  • Modeless Preset Settings dialog box (allowed access to other parts of the program): you could turn this option on if you want to get modeless Preset Settings, Choose Preset and Tune Preset dialog boxes, which allows access to the other parts of the program while these dialogs are still opened; when that option is turned off, the mentioned dialog boxes will be modal and you need to close them if you want to continue using the other parts of the program.
    RegExpReplace-6.0 - Adjust Preset

    Adjustment of presets

    This add-on has a possibility to display a resizable dialog box for the adjustment of a preset, if it is prepared adequately, whenever you start its execution using menu/toolbar/hotkey. Using those dialog boxes is much simpler than the Preset Settings dialog box which has many controls that are confusing for beginners. For example, you could choose Edit > RegExp Find and Replace > Field Manipulations > Copy <From Field> to <Into Field>... and you would get the dialog box with just two dropdown lists for choosing the source and the destination fields. The number of displayed controls depends on the adjustment tags that are used in the preset.

    If the name of preset contains <Into Field> tag, you will get the adjustment dialog box with one dropdown list from which you could choose the destination field after you start the execution of preset. Similarly, if you specify <From Field> tag in the name of preset, you would get the dialog box with the dropdown list for choosing the source field. Of course, if you specify both <Into Field> and <From Field> in the name of the preset, you would get the dialog box with both dropdown lists. For example, the included preset "Copy <From Field> to <Into Field>..." displays both lists.

    If you specify custom parameters inside of the Find what and Replace with strings using the <String Caption="xxx" Value="yyy"> tag, you would get the adjustment dialog box with the text box in which you could write some string and that string would be entered into same place in the Find what/Replace with string where you have put that <String> tag. Also, if you specify the <Number Caption="xxx" Value="yyy"> tag, you would get the dialog box with the spin/slider controls for choosing the numeric value. For example, if you write <Number Caption="Increment" Value="10"> instead of 10 in some preset, you would get the dialog box which allows adjusting of that numeric value.

    The Value argument is mandatory for those two tags. The Caption argument allows you to specify descriptive text which would be displayed next to the control; it is not necessary to be specified, but it would be better for understanding of such preset if you use it. The <Number> tag additionally allows to specify two optional arguments: MinValue and MaxValue, the first one is for specifying the minimum value which could be entered with the spinedit control, and the second one is for the maximum value. If you omit those arguments, the default values are 0 and 100 correspondingly.

    You could specify as many <String> and <Number> tags in the Find what and Replace with string as you want, and you would get the adequate number of controls within the preset dialog box. Of course, those controls would be displayed together with the source and the destination dropdown lists if you have <From Field> and/or <Into Field> in the name of the same preset. For example, the included preset "Replace specified string with another one in <Into Field>..." has the adjustment dialog box with the destination dropdown list and two text box controls - the first one is for specifying the string which would be replaced and the other one is for specifying the replacement string.

    The new version of the add-on also supports the <If>, <Else>, <End If> and <ID> tags. The <If> <Else> <End If> construction of tags allows conditional execution of some parts of the Find what/Replace with strings.

    The <If> tag has three different forms:
    1) The standard one is when you specify the Caption and Value arguments. It could have 0 and 1 as a Value argument, or "False" and "True".
    If the Value is 1, the text between <If> and <End If> tags will be included in the Find what/Replace with strings; otherwise, if the Value is 0, the text will be omitted.
    If the Value is 1 and if <Else> tag is specified between <If> and <End If> tags, then only the text between <If> and <Else> tags will be included in the Find what/Replace with strings, but the text between <Else> and <End If> tags will be omitted; if the Value is 0, the text between <If> and <Else> tags will be omitted and the text between <Else> and <End If> tags will be included.
    If you use the <Else> tag without the Caption argument, the whole <If> <Else> <End If> construction will be displayed as a check box in the Adjust dialog box. However, if you specify the Caption argument in the <Else> tag, the same construction will be displayed as a group containing two radio buttons: the first button will display the Caption specified in the <If> tag, and the second one will display the Caption specified in the <Else> tag.
    The <If> tag in the first form could have a specified ID argument as well.

    2) The second form of the <If> tag is when you specify only the ID argument. In this case it could be treated as if it has a Value as another <If> tag with the same ID argument that has specified the Value argument. The second form (with only ID argument) is not displayed in the Adjust dialog box as any control, but its nested controls/tags will be displayed next to the controls/tags contained in the corresponding <If> tag that has specified the Value argument.

    3) The third form is when you specify the Value argument without the Caption argument. This form will not be displayed in the Adjust dialog box either. It is mostly useful if you want to specify some VBscript expression in the Value argument, e.g. <If Value="Len(""<ID:2>"") > 0"> ... <End If>, which will have included/excluded text in the Find what/Replace with strings depending on the result of that expression.

    The <End If> tags should not have any specified argument.
    The text between <If> and <End If> tags could contain other tags which would have corresponding controls enabled if the Value of <If> tag is 1. The text between <If> and <End If> tags could contain other <If> / <End If> blocks as well, which means that they could be nested without any limit on depth.

    The <ID> tag allows the same text to be used several times in the Find what/Replace with string without its repeating and should have only one argument, e.g. <ID=1>. That tag will be replaced in the string during run-time with the Value argument of another <String>/<Number>/<If> tag that has the same ID argument. The ID argument could also be used to specify the order of controls in the dialog box.

    Adding any of those mentioned tags to the presets is optional. The presets with those tags are longer and somewhat harder to write, but you could do that just once and after that their adjustment using the adjustment dialog box will be child's play. Of course, many of the predefined presets are already written with such tags, so you could use them out of the box.

    The adjustment dialog boxes that you get when you choose presets by menu/toolbar/hotkey are similar to the Tune dialog box that could be opened from the Preset Settings dialog box; with the difference being that the preset will actually be applied to them when you click on the OK button in them.

    The adjustment dialog boxes also have the Don't show this dialog anymore check box on the bottom. If you have ticked on that check box, after confirming execution of the preset, the subsequent presets started by menu/toolbar/hotkey will be applied without displaying the adjustment dialog box. If you want to have the adjustment dialog box displayed again, you should turn on the Show dialog box for adjusting of the preset selected in the menu or toolbar option in the Options dialog box.

    Presets

    Notice

    This add-on is a false positive reported as a worm by F-Secure. The author of F-Secure promised me that will update its database and put the add-on on the white-list, but still didn't. If you go to the www.virustotal.com/en/ site, you will see that it is safe tested by 54 popular anti-virus engines; the only one reporting a worm in it is F-Secure. By the way, over the last few years F-Secure continues to have the largest number of false positives, according to the Real-World Protection Test by AV-Comparatives.

    If you are interested in my other add-ons for MediaMonkey, you could visit the following page.