RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

MMFrLife
Posts: 2774
Joined: Fri Oct 26, 2012 9:04 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Wed Dec 28, 2016 12:33 am

Back everything up first. And be careful to pay close attention to what you are doing, especially with a script like this
Preset 67 is the one you want. "Remove Specified number of characters from the beginning..."
make copies of a couple of files with the issue to test by selecting them.

Open Preset Settings dialog (read title bar to make sure that is where you are after opening) > look to the left of the preset title field and click the "..." button.
scroll down to preset 67 > select it by highlighting it > press "ok" at bottom > it will load into the main dialog.
It might ask something like, "you have modified...do you want to save it? click 'no'" > the chosen preset should be loaded
into main dialog >

right of dialog there should be an "Into Field" dropdown menu, choose "Title" if not already chosen
> look in "Find What" field > look for something like "Number Caption=""Num. of characters"" Value=""7"" > put desired number there (if 1 character space, enter 1 in
between quotes) > Check results in bottom display fields (under Replace What and "all" tracks at bottom). If it looks correct, press "Replace all".

Remember to "test" this first, as mentioned.
MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
track properties; dir/fn mask configurations; check out ZvezdanD's scripts
MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
Backup 6.0; Clear Now Playing Button 1.2
...always back it up, especially before doing anything major!!!
Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

jgt1942
Posts: 64
Joined: Mon Feb 04, 2013 12:53 am

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by jgt1942 » Wed Dec 28, 2016 1:10 am

MMFrLife - Much thanks, I went through the darn list 5 times before I found the correct script. It worked like a charm.

How in the heck do you find what you need in the darn list?
Is list of scripts documented anywhere?

Is it possible to insert a number to identify the position in the list? example
001 Replace specified string with another one in <Into Field>
002 Replace underlines with spaces in <Into Field>
etc.......

MMuser2011
Posts: 1290
Joined: Mon Oct 17, 2011 8:28 am
Location: Central Europe

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMuser2011 » Wed Dec 28, 2016 4:17 am

jgt1942 wrote:How in the heck do you find what you need in the darn list?
One possibility: You can open your MediaMonkey.ini with a text editor (like Notepad++) and search for the entry

Code: Select all

[RegExpPresets]
You will find all the existing presets and you can search for specific terms like "Title" or "Remove specified number of characters from the begin".
Magic Nodes v4.3.3 (2018-10-03) last free version SQL Viewer v2.4 (2009-10-25)
ExternalTools v1.4 (2011-05-09) iTunesMonkey 1.0 + Acoustid
Calculate Cover Size v1.7 (2012-10-23) RegExp Find & Replace v4.4.9 (2018-10-03) last free version

MMFrLife
Posts: 2774
Joined: Fri Oct 26, 2012 9:04 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Wed Dec 28, 2016 8:21 am

If by the "list" you mean the preset titles field list, then I wouldn't recommend using that to start learning.
I would recommend finding presets you want the way I described.

At the bottom of the Choose RegEx Preset list ("..." button) there is a search control. As a test, put "remove specified characters" into the search field at the bottom
and click "next" to the right of the field. If you are typing in terms that are in a combination that exists somewhere in the list
the next button will have focus. As you type something that does not exist or is in improper combination, the button's focus will drop out.

The text editor method, although logically solid, is not recommended; it presents a more accident conducive environment and is really unnecessary
if using the above method. Also, you should never open files that are used by MM while MM is running.

You can rename things (Update existing presets, ADD new ones based on them or create new ones from scratch). It is strongly recommended to ADD custom presets rather than alter and update existing ones. You can also reorder the presets list (I think that is a free version feature) in the Manage Presets dialog. All of this is its own "careful" process and may not necessarily give you the exact results you want in the preset title dropdown or the Choose RegEx Preset dialog list. It is strongly recommended to ADD custom presets rather that alter and update existing ones. You should spend time familiarizing yourself with what's already been suggested at the beginning of this post and read through the usage instructions, "patiently", before proceeding.
MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
track properties; dir/fn mask configurations; check out ZvezdanD's scripts
MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
Backup 6.0; Clear Now Playing Button 1.2
...always back it up, especially before doing anything major!!!
Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by ZvezdanD » Wed Dec 28, 2016 9:39 am

The search control at the bottom of the presets list is not available in the freely available version of the add-on, nor is the Choose RegExp Preset dialog box. However, the first post of this thread has a list of all presets that are included in the freely available version; just press Ctrl+F in Web browser and type what you want. The Web page of the donation-only version has detailed Usage section which is unfinished, but is still worth reading since most things are in common with the freely available version.

By the way, the "Remove leading and trailing spaces from <Into Field>" preset is much better for removing blanks from the begin/end than the "Remove specified number of characters from the begin".
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

MMFrLife
Posts: 2774
Joined: Fri Oct 26, 2012 9:04 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Wed Dec 28, 2016 10:04 am

Thanks for clarifying ZD, it's been so long since I used the free version. The enhanced version is so nice, so easy to get caught up in it.
"Remove leading and trailing....". Oh yeah, forgot about that one. It's a good one :wink:
MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
track properties; dir/fn mask configurations; check out ZvezdanD's scripts
MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
Backup 6.0; Clear Now Playing Button 1.2
...always back it up, especially before doing anything major!!!
Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

jgt1942
Posts: 64
Joined: Mon Feb 04, 2013 12:53 am

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by jgt1942 » Tue Jan 03, 2017 3:35 pm

MMuser2011 wrote:
jgt1942 wrote:How in the heck do you find what you need in the darn list?
One possibility: You can open your MediaMonkey.ini with a text editor (like Notepad++) and search for the entry

Code: Select all

[RegExpPresets]
You will find all the existing presets and you can search for specific terms like "Title" or "Remove specified number of characters from the begin".
Much thanks for the suggestion. RegExp Find & Replace helped me clean up what I see as problems in my library and once I learned (just enough) how to use it the process was super fast. I'm not sure how much cleaning up I will do in my 520 GB library I have other things more important or so I think. :D

Over the holidays I also learned about the Amazon Echo and Google Home, like WOW! With their ability to pull up almost any song I'm starting to question why do I need a music library on my system.

Again much thanks for the help.

MMFrLife
Posts: 2774
Joined: Fri Oct 26, 2012 9:04 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Tue Jan 03, 2017 4:02 pm

jgt1942 wrote:Much thanks for the suggestion. RegExp Find & Replace helped me clean up what I see as problems in my library and once I learned (just enough) how to use it the process was super fast.
Glad you got it working! :)
jgt1942 wrote:Over the holidays I also learned about the Amazon Echo and Google Home, like WOW! With their ability to pull up almost any song I'm starting
to question why do I need a music library on my system.
It's good to have a backup source in case there is a discontinuation of that service or periodic problems. Also, if you have something it can't find
(like rare, out of print, buying is the only way to access, etc.).

Anyway, not to get off topic but in sum:
So, "You will have a music library on your system and you will find it necessary"! (Jedi mind trick) :wink:
MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
track properties; dir/fn mask configurations; check out ZvezdanD's scripts
MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
Backup 6.0; Clear Now Playing Button 1.2
...always back it up, especially before doing anything major!!!
Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

dypsis
Posts: 1084
Joined: Wed Apr 30, 2008 9:51 pm
Location: Brisbane, Australia

Re: How To Change The "Added" Date

Post by dypsis » Fri Jan 06, 2017 12:20 am

I need some help changing the "Added" date on a couple of tracks in MediaMonkey.

It has been suggested in this thread that RegExp Find & Replace can do it.

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by ZvezdanD » Fri Jan 06, 2017 3:15 am

As MMFrLife already told you in that thread, you could do it by choosing the "Assign specified string to <Into Field>" preset and the "Added" field in the Into combo box. Enter the wanted date/time value in the Replace with combo box.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

dypsis
Posts: 1084
Joined: Wed Apr 30, 2008 9:51 pm
Location: Brisbane, Australia

Re: How To Change The "Added" Date

Post by dypsis » Fri Jan 06, 2017 3:25 am

ZvezdanD wrote:As MMFrLife already told you in that thread, you could do it by choosing the "Assign specified string to <Into Field>" preset and the "Added" field in the Into combo box. Enter the wanted date/time value in the Replace with combo box.
This is what comes up when I select that preset from the track context menu. :-?

Image

MMFrLife
Posts: 2774
Joined: Fri Oct 26, 2012 9:04 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Fri Jan 06, 2017 12:54 pm

dypsis,

My advice, when you are starting out, is not to use the menu until you are more familiar with things.
Start by using the "preset settings" dialog .

I don't have it in front of me, but see if there is a toolbar button with a plus sign and perforated square behind it (I think that's it).
Hover over that to see if there is a description. If you already accessed the menu from its toolbar button, the preset settings toolbar button
should be right next to it from the left. If you don't see that button, go to Options > Left column of dialog box and look for RegExp settings.
Check where it says something about show toolbar.

When you click on that, the preset names should be in the top field with dropdown. Select dropdown to search for preset. If you have trouble looking
for it, you can go to download page and look for it in the presets list there. Anyway, you can change settings there (INTO combo box and Replace With string)
You can view the results before you execute the script.

On the other hand, if you are feeling bold, you can try it from that adjustments dialog you have from the menu (no pre-results display).
If you have the files you desire selected, use the destination dropdown and change to "Added" > delete or overwrite string field and assign a new one
in the format used in the "Added" tag (which is easier to see with the above-mentioned way).
MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
track properties; dir/fn mask configurations; check out ZvezdanD's scripts
MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
Backup 6.0; Clear Now Playing Button 1.2
...always back it up, especially before doing anything major!!!
Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

dypsis
Posts: 1084
Joined: Wed Apr 30, 2008 9:51 pm
Location: Brisbane, Australia

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by dypsis » Fri Jan 06, 2017 5:48 pm

Thanks for the tips, MMFrLife.

Image

Why does it refer to "Encoded By" everywhere?
Also, it says that the Original Added is 29/12/2016. That's not right. MediaMonkey is displaying 02/01/2017.

What's the next step? :-?

MMFrLife
Posts: 2774
Joined: Fri Oct 26, 2012 9:04 pm

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Fri Jan 06, 2017 5:53 pm

"Encoded by" is just a sample string.
Go to Replace With field and change that string to what you want, just that one part of the field (leave the quotes alone).

I'm not sure why there is that discrepancy on old/new "added". When you look back to MM are you sure you're not accidentally looking at Timestamp or some other field.
Try this,
Click on the "New" button in the upper right > tell it not to save if it asks > look for and reload preset again
MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
track properties; dir/fn mask configurations; check out ZvezdanD's scripts
MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
Backup 6.0; Clear Now Playing Button 1.2
...always back it up, especially before doing anything major!!!
Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

dypsis
Posts: 1084
Joined: Wed Apr 30, 2008 9:51 pm
Location: Brisbane, Australia

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by dypsis » Fri Jan 06, 2017 7:03 pm

So, I just go to the Replace With field and delete everything in there and just add the date that I wish like this 29/12/2016 ?

Post Reply