RegExp Find and Replace
- MediaMonkey Add-on - by Zvezdan Dimitrijević
This add-on works with MediaMonkey v2.x-4.x. It allows powerful finding and replacing of strings inside of selected/visible tracks in the main tracklist or the Now Playing panel. The matching criteria and the replacement string can be created using Regular expressions or VBScript expressions which provide very flexible transformations of data. It has support for custom presets with 253 already predefined: clear field, copy conditionally full or part of one field to another, swap the first and the last name of Artist, ... Almost all MM fields are supported!
Although this add-on is so flexible and powerful, using the predefined presets is almost trivial: just select the tracks that you want to modify, choose the needed preset from the Edit > RegExp Find & Replace > Tags Manipulation Presets menu and adjust the fields/values if that is necessary. Just take a look at how simple it could be:
There is even a simpler way to apply that preset to the selected tracks with just a single click on the new toolbar button, instead of digging for it in the overcrowded Tags Manipulation Presets menu to open its dialog box. In that case, you should turn on the Toolbar button check box for the needed preset using the Preset Settings dialog box and click on the Update button. Or, if you prefer the keyboard, you could specify a hotkey for the needed preset using the Shortcut command, e.g. Ctrl+T and you will get modified tracks by pressing on that keyboard hotkey.
For a discussion about this add-on, you could visit its MediaMonkey forum thread. If you are using a skin that is not supported by default, you could take a look at skin styles for this add-on made by nynaevelan at the next forum thread.
This add-on is donationware. I am its sole developer and work on it in my own free time. I am not employed by Ventis Media, the company behind MediaMonkey, nor have I been paid by them for my efforts. If you find my add-on useful and want to help its further development, it would be nice if you could send a small donation using PayPal. In that case you will receive the enhanced version as a gift that is available only to donors.
The enhanced version of the add-on is sent via e-mail attachment. If your personal e-mail address is different than the one for your Paypal account, please leave me a note with that info. After donating, if a day or two has passed and you still have not gotten my e-mail, you should check your Spam folder; if you cannot find it in there, please send me an e-mail with the information about your donation to:
. To avoid that from happening, I strongly recommend putting my e-mail address in your contact list before you make a donation to prevent it from being seen as spam, especially if you are a GMail user. Thanks in advance!
This add-on doesn't work with MediaMonkey v5! No add-on made for a previous version of the program will work with MM5, either by me or any other author, since MM5 has completely different programming interface than before. If you really like my add-on and think that it is essential for your work with the program, you have several possibilities:
- you could stay with MM4;
- you could ask MM developers to implement support for old add-ons in MM5;
- you could wait for me to port the add-on to MM5, but don't hold your breath.
There are reports that MediaMonkey with this add-on has a very slow startup on Windows 10 after its April 2018 Update when Windows Defender has Real-Time Protection enabled. This problem is reported to Microsoft, but they don't care about it. You could do any of the next things:
- go to Microsoft site and leave your report, there is a better chance that the folks at Microsoft will do something about the problem if more people request that; or
- turn off Windows Defender Real-Time Protection and use some another anti-malware; or
- remove all RFR presets that you don't need since this slow down is related to the number of installed presets; or
- donate to me and you will receive the enhanced version of the add-on which has implemented a workaround for this problem, making it as fast as before the mentioned Windows Update.
I am sorry, but currently I don't have time to implement the same workaround in the freely available version.
Fixed: Ignore To All option when there is an error on replacing.
v4.4.8 - 2017-02-05
Fixed: update of the Date Modified property of file when changing the Timestamp feld;
v4.4.7 - 2017-01-07
Fixed: unneeded update of the timestamp when modifying non-tag fields (e.g. Added);
Fixed: Delete emptied folders option after moving files, all empty parent folders are now removed (until now only empty folder that contained moved media file(s) was removed, but not its empty parent folders).
v4.4.6 - 2016-04-22
Fixed: typing numerical values on keyboard in SpinEdit controls on the adjustment and Preset Settings dialog boxes (functional only in MM v18.104.22.1689 or higher);
Fixed: unnecessary display of dialog box on start-up asking if you want to install new presets after automatic adjustment of clock caused by switch in daylight saving time;
Fixed: Date and Original Date fields, now they display dates using ISO format and accept empty string for resetting the field;
Fixed: display of source/destination field in the adjustment dialog box for renamed Custom fields;
Fixed: Replace All button in the Preset Settings dialog box for presets that use bReplacing variable (e.g. the "Swap fields" preset).
v4.4.1 - 2015-08-26
Added: possibility to specify <Into Field> tag in the Replace with string which would be replaced with the field specified in the dropdown list next to the << button when the VBScript expression is turned on (this allows more generic presets that could be used with any selected field instead of hard-coded ones in the Replace with string);
Fixed: incorrect modification of tags and presets when using the Tag Manipulation Presets menu (broken in 4.4).
v4.4 - 2015-06-22
Added: pop-up menu items to the tracklist and Now Playing panel;
Fixed: many things.
v4.3 - 2011-07-06
Added: independent toolbar for RegExp buttons instead of Search toolbar [MM4];
Fixed: assigning numerical values to textual fields, e.g. Track# (broken in v4.2).
v4.2.1 - 2011-06-22
Fixed: error when replacing Type field [MM4].
v4.2 - 2011-06-21
Added: All Text Fields item to Into and From dropdown lists which allows assigning the same value to the several fields at once (with MM 3.1 or higher it could be specified which fields you want to modify using settings in the Search sheet of the Options dialog box; please be careful with that option, especialy with the specified Path field!);
Added: possibility to specify <From Field> tag in the Replace with string which would be replaced with the field specified in the dropdown list next to the << button when the VBScript expression is turned on (this allows more generic presets that could be used with any selected field instead of hard-coded ones in the Replace with string);
Added: Series, Director, Producer, Actor, Parental Rating, Episode #, Season # and Type (new) fields [MM4];
Changed: old Type field to Extension, Original Album Title to Original Title, Skip Counter to Skipped # (please update your own presets that contain these fields);
Added: 36 new presets, most of them using the new possibility with the <From Field> tag; the most important new preset is "Swap <From Field> and <Into Field>" which shows how it is possible to use single preset to modify two or more fields at once; some old presets fixed;
Fixed: case modification of Path/Folder.
v4.1 - 2011-03-03
Added: Start Time, Stop Time and Skip Counter fields (Start Time and Stop Time values in milliseconds) [MM4];
Added: MapChrCase and MapArrayCase custom functions, modified MapChr and MapArray functions (MapChrCase has same behavior as old MapChr and MapArrayCase has same behavior as old MapArray, MapArrayCase is similar to MapArray, but the replaced string would be capitalized if the first character of the original string is in upper case. Preset example: "Remove diacritical marks...");
Improved: import/export of presets with the same name, but different contents;
Fixed: install of sample presets when add-on is installed in local folder [MM4];
Fixed: skin styles path [MM4];
Fixed: error with some fields (Filename, Date, ...) when Regular expression 2 is turned on.
v4.0.4 - 2010-12-02
Added: 10 new presets, some old updated;
Fixed: RegExp-ID3_Genres.ini file with presets for ID3 genres, so the same genres could not be assigned twice to the same tracks;
Fixed: problem with SQLQuery function in some cases.
v4.0.3 - 2010-05-21
Added: 13 new presets;
Fixed: error when "Trim toolbar button's caption" value is changed.
v4.0.2 - 2010-05-10
Fixed: <Number> tag with MinValue and MaxValue arguments.
v4.0.1 - 2010-04-14
Changed: preset captions in the menu/toolbar when "Show dialog box for adjusting of the preset..." is checked on.
v4.0 - 2010-04-10
Added: possibility to specify custom arguments inside of the Find what and Replace with strings using <String> and <Number> tags, e.g. instead of 1 in some preset you could write <Number Caption="Increment" Value="1"> and when you choose that preset from menu or toolbar you would get dialog box which allows adjusting of that value; for description about this functionality please take a look at the Adjustment section;
Added: possibility to adjust source and destination fields inside of mentioned dialog box for preset, if you specify <Into Field> or <From Field> in the preset name;
Added: option "Show dialog box for adjusting of the preset selected in the menu or toolbar" (you could turn off display of the mentioned dialog box, even if you have presets with custom arguments);
Added: option "Modeless Find & Replace dialog box (allowed access to other parts of the program)" (now you could use F&R dialog without ever closing it);
Added: option "Display of tracks in Find & Replace dialog box synchronized with main window" (when you change node or selected tracks, this is automatically reflected in the F&R dialog; fully functional with MM 22.214.171.1248 or up);
Added: option "Show the toolbar button for the Find & Replace dialog box"
Added: option "Show the toolbar button for the Presets dropdown list"
Added: option "Show toolbar buttons for presets with enabled button in Find & Replace dialog box" (you could turn off all preset buttons, even if they have Toolbar button option checked on in the F&R dialog);
Added: Folder, Filename and Type fields (Path = Folder \ Filename . Type);
Added: Bookmark and Playback % fields (the playback position for audiobooks, the first field is in ms and the second one is in percents);
Added: DateISO, SetVar and GetVar custom functions;
Added: many new presets, some old improved;
Changed: Save button now have 3 possible states depending of modifications in the F&R dialog - Rename, Update and Add (it is now much easier to create new preset based on some existing one).
Fixed: error during start-up if none preset exists.
v3.5 - 2009-05-14
Improved: skin styles;
Fixed: load of empty and duplicated presets.
v3.4.3 - 2009-05-10
Fixed: modifications of the Date and the Original Date fields.
v3.4.2 - 2009-04-14
Fixed: saving of presets with localized versions of Windows.
v3.4.1 - 2009-02-25
Fixed: Replace/Replace All for some presets (a bug introduced with the last update).
v3.4 - 2009-02-21
Added: possibility to cancel Find Next/Replace All operations;
Added: insert of the field name on the cursor position in the Replace with edit box (MM 126.96.36.1992 or up);
Added: some new presets;
Improved (bug): speed of the Replace All (drastically) when there are many unmatched tracks (bug).
v3.3 - 2009-02-02
Added: auto-repeat for Up/Down buttons in the Export/Import dialog box with MM 188.8.131.520 or up;
Added: word-wrap option for display of presets in the Export/Import dialog box;
Added: alphabetical sort of presets in the Export/Import dialog box by click on the table header.
v3.2 - 2009-01-20
Improved: look of dialog boxes with some skins (custom configurable with CSS files);
Improved: speed of selecting tracks for main tracklist (drastically) and Now Playing panel with MM 184.108.40.2064 and up;
Added: some new presets (some old improved).
v3.1 - 2009-01-10
Added: option to enable/disable display of the toolbar button for the last executed preset;
Added: option to keep display of the toolbar button for the last executed preset after restart;
Added: some new presets (some old improved);
Fixed: detection when the Now Playing panel has a focus, even with MM3 older that 220.127.116.110;
Fixed: Select un/matched/Select to replace.
v3.0 - 2009-01-02
Added: export/import/batch delete of presets;
Added: option to display every checked preset as the toolbar button;
Added: option to asign an icon to the preset item in the menu/toolbar (could be from external .ico file);
Added: option for backward direction when finding matched tracks;
Added: possibility to find/replace data in tracks from the Now Playing panel [MM3];
Added: Day, Month, Date, Original Day, Original Month and Original Date fields (the old Date renamed to Year, the old Original Date renamed to Original Year; the new Date/Original Date accepts full date format YYYY-MM-DD) [MM3];
Added: option to delete emptied folders when moving files as a result of the Path modification;
Added/improved: the New button (old behavior when creating new presets is abandoned);
Added: many new presets (many old improved);
Improved: speed of Replace and Replace All when only few songs from a large list of songs should be updated;
Fixed/improved: Select un/matched/Select to replace with large number of selected/visible tracks;
Fixed: reading/writing presets from the .ini file with MM 18.104.22.1688 and newer (actually, the format of presets in .ini file is changed);
Fixed: truncated bottom buttons with some skins.
v2.2.2 - 2008-06-20
Fixed: error "file not found".
v2.2.1 - 2008-06-19
Added: synchronous display of current track in the table during navigation;
Added: possibility for jump to current track by click on the coresponding row number in the table;
Fixed: reset of the table after Replace command;
Fixed: checked state of rows in the table after toggle with the "?" button;
Fixed: merging new presets with old ones after installation for multi-user accounts.
v2.2 - 2008-06-14
Added: possibility to check which tracks from the table should be replaced;
Added: IfNull custom function for use with VBScript expressions;
Added: many new presets (some old improved);
Fixed: moving to the previous/next group of tracks (buttons |< and >|).
v2.1.2 - 2008-06-11
Fixed: display of the new line characters in the string when used with the VBScript expression.
v2.1.1 - 2008-06-10
Fixed: display and replacement of the new line characters in the string (Lyrics, Comment).
v2.1 - 2008-05-27
Added: options to select all un/matched tracks in the tracklist (Sel. matched and Sel. unmatch.) [MM3];
Added: options to keep only un/matched tracks, other tracks are removed from the tracklist (Keep matched and Keep unmatch.);
Added: option to select all tracks that could be modified, i.e. old content is different than replacement (Sel. replace) [MM3];
Added: option to keep only tracks that could be modified (Keep replace);
Added: option to toggle between selected/visible tracks;
Added: different highlight colors for matched tracks and for tracks that could be modified;
Added: SQLQuery custom function for use with VBScript expressions;
Added: many new presets (some old improved);
Improved: response during a table refresh with time consuming expressions;
Fixed: table with old/new content not updated after Replace All.
v2.0.1 - 2008-05-19
Fixed: INI file with presets;
Fixed: the ordinal number of tracks displayed in the table.
v2.0 - 2008-05-19
Added: support for presets (Save, Delete, Move Up/Down) with more than 30 already predefined;
Added: support for VBScript expressions for replacement;
Added: the table with old/new display for defined number of selected/visible tracks;
Added: highlighted display of matches;
Added: Find what/Replace with dropdown lists with recently entered strings;
Added: support for the progress bar and many other improvements.
v1.0.2 - 2008-05-07
Fixed: updating tags into files.
v1.0.1 - 2008-04-25
Fixed: error which is manifesting with double apostrophes inside of the field text.
For MediaMonkey 3.0 or higher - just double-click on the RegExpReplace-xx.mmip file; if you are on Vista or Win7 and you get "Product installation error", make sure you have MM3 set to "Run as Administrator"; if you downloaded the installation package with IE7 and it changed its extension to a .zip, you should first change it back to a .mmip.
For MediaMonkey 2.x - rename a .mmip extension to a .zip, extract RegExpReplace.vbs and RegExpReplace.ini files to the MediaMonkey's "Scripts\Auto" folder and restart MM program.
Note: The RegExpReplace.ini file in Auto folder is used only after installation. During its work, the RegExp Find & Replace add-on stores presets in the MediaMonkey.ini file.
If you are upgrading this add-on from some old version, especially if there is updated syntax of presets, it is strongly recommended to 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 > Maintain 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 > Maintain Presets dialog box.
This way, you will always have the latest and updated presets. If you don't remove the old settings (together with presets), during installation this add-on will check the preset's names and if they are the same as the old ones they will be skipped (even if they were updated).
The RegExp Find and Replace add-on could be used by beginners as well as very advanced users:
1. Beginners could use the add-on by just applying the presets from the menu. You will find 250+ predefined presets for different tasks that are useful without any additional adjustment, e.g. you could clear field, copy conditionally full or part of one field to another, swap the first and last name of an Artist, etc. 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 "Swap nn-th and mm-th words of <Into Field>" you could set 3 parameters: Destination field, First word and After words.
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. 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 that are started by menu/hotkey/toolbar will be applied to the files selected in the main filelist or Now playing panel, depending on which panel is active.
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 Presets dropdown list option is turned on in the Options dialog box.
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 creating/editing presets and finding/replacing metadata in files/database. 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. Del, Export or Import. It also has some other commands that are better used when the presets are displayed in the tabular form, e.g. Up or Down for moving a preset inside the list.
Options - when you choose this command, it will open 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.
The next item in the menu displays the last applied preset and it is visible only if the Show the toolbar button for the last executed preset from the menu list option is turned on in the Options dialog box.
Tags Manipulation Presets - this sub-menu contains all presets that are stored in the MediaMonkey.ini file, if you choose an item from that menu it will start execution of the corresponding preset.
RegExp Find and Replace / Preset Settings
The Preset Settings dialog box can be used for creating/editing presets and finding/replacing metadata in a file(s) and/or the database. This dialog box is resizable, so it can be enlarged if the content of a control is not fully visible.
The first group of controls, at the top of the Preset Settings dialog box, is mainly about setting 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 is a combo box containing a list of all stored presets. You could select a preset from that list, then apply it to the selected files or modify its settings to suit your needs. That control also allows you to enter a name for the new preset (just keep in mind that all presets should have unique names).
Next to the Preset combo box we have Move up/down buttons which allow us to move a selected preset up or down in the list. Then we have 3 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 should be used if we want to save the currently selected preset and it has 3 states/captions depending on modifications of the preset's settings:
1. Rename - if you only change a preset's name and leave its parameters unchanged;
2. Update - if you only change any preset parameter (e.g. Description) and leave its name unchanged;
3. Add - if you change both a preset's name and parameter(s).
The last button in this row is Del which could be used when we want to remove the selected preset from the list permanently.
The first control in the next row is the Description text box which could be used to enter some information about the selected preset, e.g. to describe its effect with some examples. The description will also be displayed as a hint if you hover a mouse over the corresponding menu item or toolbar button of the preset.
If you want to apply a preset without searching for it in the Tags Manipulation Presets menu, you could assign a hotkey to the selected preset by using the Shortcut text box, e.g. you could specify Shift+Ctrl+T, and you could apply such preset to the selected files by pressing on that hotkey.
If you prefer the mouse over the keyboard, you could assign a toolbar button to the selected preset by ticking the Toolbar button check box, so you could just click on that button to start its execution. The toolbar buttons for the RegExp presets are displayed on the Search toolbar in MM2-3 or 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 Toolbar check box.
The toolbar buttons of presets could display 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 Trim toolbar button's caption (maximal number of characters) option 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 by 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 a MM's internal 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 an icon from a 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.
The remaining controls in the Preset Settings dialog box mainly describe how the selected preset should perform. The first control in the so-called finding group is the Find what combo box, which is used to specify the string that we want to search for and/or to replace in the destination field. The Find what combo box has a dropdown list with the history of the last 5 applied search strings.
The next control is the Into combo box and with it we could specify the destination field that will be searched (and/or modified). 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 of the freely available version of the add-on 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!
Copying a (part of a) string from a source to destination field modifies only destination field, so it could be done using a single (preset's) settings. However, moving a (part of a) string from a source to destination field requires modification of both fields, source and destination, which is not directly supported by this add-on using a single (preset's) settings.
If you want to modify several fields, you could do that most easily with several appropriate presets applied in sequence. It is also 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 Original info box is below the Find what control and it displays the old content of the destination field specified with the Into combo box, i.e. the content before the applied replacement.
The Regular expression 1 check box should be ticked on if we want to use regular expressions in the Find what string. The next Full button is enabled only if the Regular expression 1 is ticked on; it could be used to insert the "^.*" string into the Find what combo box, which is the Regex replacement for the full content of the field, not matter what the selected field contains (this feature does not work correctly with the multi-line Comment and Lyrics fields).
The Find whole words only check box should be ticked on only if we want to search for whole words (otherwise, any field text that contains the specified Find what string would be matched). It could be used only when the Regular expression 1 is ticked off since the regular expressions have their own way of finding whole words.
The first control in the so-called replacing group is the Replace with combo box, which could be used for specifying a string that we want to use for the replacement. Similarly to the Find what combo box, this control has a dropdown list with the history of the last 5 applied replacement strings.
The next control is the From combo box which is enabled only if the Regular expression 2 or VBScript expression is ticked on. If the Regular expression 2 is ticked on, then you could use the From dropdown list to specify the source field for the replacement. However, if the VBScript expression is ticked on, then you could use the From list to select some field which you want to insert into the Replace with string using the newly displayed << button (it is visible only if VBScript is ticked on). Or, you could choose a field which would 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).
You should tick on the Regular expression 2 or VBScript expression check boxes if you want to use the corresponding expressions in the Replace with string. The Full button next to the Regular expression 2 check box could be used to insert "^.$" into the Replace with string if Regular expression 2 is ticked on, which is similar in purpose to the Full button next to the Regular expression 1 check box.
Similarly to the Original info box in the finding group, the Replacement text box that is below the Replace with combo box serves only to display the current content of the source field specified in the From list, but only if you have Regular expression 2 ticked on.
The Result info box 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 last control, which defines a preset's settings, is the Match case check box. 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". It determines behavior of both Find what and Replace with strings.
The Backward search direction check box that is located in the same group as the previous controls is not, technically speaking, a part of the preset settings, but it is only temporarily located there because of a lack of space in the dialog box - if it is ticked on, the Find Next button becomes Find Prev and allows searching for the specified string backward in the range of selected files, starting with the current file whose number is displayed in the left-bottom corner of the dialog box.
The table below the replacing group of controls 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 Maximal number of table rows in the Find & Replace dialog box option. 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.
If you click on the leftmost "?" button from the bottom row of controls you would get the short reference for the Regular expressions and custom VBScript functions used in this add-on, which will be displayed in place of the mentioned table with files; if you click on the same button again, that file table will return.
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 (Original, Replacement, Result). The up/down buttons next to that text box serve to change the current file by an increment of one step, while |< and >| buttons on the left side of that text box change it by 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 would 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.
The Find Next button could be used to locate the next file that matches criteria specified with the controls in the finding group and that file would become the current one. If the Backward search direction check box is ticked on, that button will become Find Prev and with it you could search for the previous file which matches the specified criteria.
The Replace button can 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).
The last button at the bottom row, before the Close button, has several possible actions that could be chosen from the list after clicking on the part of button with the down arrow: Keep Matched, Keep Unmatched, Keep to Replace, Select Matched, Select Unmatched and Select to Replace. 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 the "Keep ..." options it will remove all files from the main filelist that don't satisfy the selected option (they will only be removed from the display). For example, when you choose the Keep to Replace 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 of the "Select ..." options you would get files appropriately selected in the main filelist without removing other files.
Manage RegExp Presets
The Manage RegExp Presets dialog box contains a table with all available presets that allows batch operations on several presets at the same time. There are two radio buttons on the top of the dialog box: MediaMonkey.ini and File. If you select the MediaMonkey.ini option, it will display all RegExp presets that are stored in the main MediaMonkey INI file, i.e. the presets that are displayed in the RegExp menus. You will be able to export such presets, as well as to delete or move them.
If you choose the File option, you could get presets displayed from an external INI file which could contain e.g. your previously exported 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. You will be able to import such presets, as well as to delete or move them (if the loaded INI file is not ticked to open as read-only).
Presets could be alphabetically sorted if you click on the table header that displays information about the loaded presets. This operation is not reversible, so be careful using this option and make a backup of your presets first.
You could open the Edit RegExp Preset dialog box to edit a preset if you click its serial number displayed in the "#" column of the table for that preset in the Manage RegExp Presets dialog box; in that case, all controls in the Edit RegExp Preset dialog box (that is very similar to the Preset Settings dialog box) will be set accordingly to the chosen preset, which means that you could modify the existing presets from the Manage RegExp Presets dialog box.
Selecting/checking of the preset(s) in the table of the Manage RegExp Presets dialog box on which you want to implement some 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. Using the second way you could select only one preset at a time and that way has precedence over those two ways of selecting, i.e. even if you have some or all presets checked in the table, if you choose some operation as Del it will be applied only on the selected preset, not on the checked presets. 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 on the already selected preset again.
The Up/Down operations could be done only on one preset at a time that is selected in the table. Using the Up and Down buttons you could move the selected preset in the appropriate direction in the list of presets. Those two buttons are capable of auto-repeat; click and hold either one and the selected preset will move continuously.
The Word wrap check box could be used to toggle how the presets are displayed in the table.
You could use the Del button if you want to remove the selected/checked preset(s) permanently, so be careful using it. The enabled state of the next two buttons, Export and Import, depends on the selected option at the top of the dialog box: as it is already explained, you could export the selected/checked presets from the MediaMonkey.ini file or you could import the selected/checked presets from the specified external INI file.
The RegExp Find and Replace Options dialog box contains 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 any of the mentioned Options commands in the RegExp Find and Replace sub-menus of the Edit menu, the RegExp Tagging Presets toolbar menu (light bulb) and 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 Find & Replace 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 Find & Replace dialog box: you could set the maximum number of rows in the table of files in the Preset Settings dialog box using this option.
Trim toolbar button's caption (maximal number of characters): you could set the maximum number of characters that should be displayed on the toolbar buttons of presets.
Show the toolbar button for the Find & Replace 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 Presets dropdown list: if you turn off this option the toolbar button that shows the RegExp Find and Replace sub-menu in the toolbar will not be displayed.
Show the toolbar button for the last executed preset from the menu list: if you turn off this option the toolbar button that starts execution of the last used preset will not be displayed.
Keep the toolbar button for the last executed preset after restart: you should turn on this option if you want to display the toolbar button for the last executed preset after restarting the program; this option is enabled when the previous option is turned on.
Show toolbar buttons for presets with enabled button in Find & Replace dialog box: if you turn off this option you will not get displayed the toolbar buttons for any preset, even if some of them have the Toolbar button options turned on.
Modeless Find & Replace dialog box (allowed access to other parts of the program): you could turn this option on if you want to get the modeless Preset Settings dialog box which allows access to the other parts of the program; when that option is turned off, the mentioned dialog box will be modal and you need to close it if you want to use the other parts of the program.
Display of tracks in Find & Replace dialog box synchronized with main window: if you turn off this option the table of files in the Preset Settings dialog box will not change when you change the selection of files in the main filelist; this option is enabled when the previous option is turned on (you could change selection of files in the main filelist only if the Preset Settings dialog box is modeless).
This add-on has the possibility of displaying a resizable dialog box for the adjustment of a preset, if it is properly prepared, 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 > Tag Manipulation Presets > 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 arguments 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 spinedit control 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 parameter is mandatory for those two tags. The Caption parameter 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 parameters: 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 parameters, the default values are -1000 and 1000 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.
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.
If you tick on the Don't show this dialog anymore check box in the adjustment dialog box, after confirming execution of the preset, the subsequent presets started by menu/toolbar/hotkey will be applied without displaying of 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.
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.