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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

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

Post by ZvezdanD » Thu Dec 17, 2015 3:02 am

MMFrLife wrote:What has the feedback been on how safe 5.0 seems to be so far?
I didn't get any feedback, so I suppose everything is working fine.
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

popsmike
Posts: 174
Joined: Thu Oct 05, 2006 11:02 am
Location: Hull,UK

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

Post by popsmike » Sat Dec 19, 2015 6:04 am

I've been using version 5 for a short while in standalone test and i haven't come across any problems with it as yet.
There are a few extra additions to the script, ie: the "Tune" menu is an excellent addition to it.

It is well worth the donation guys and i'm pretty sure the Writer would welcome the appreciation at this time of the year.

Keep up the good work "Zvezdan" its very much appreciated by me. :D
Windows 10 Pro x64 2TB USB3 External Hdd with Quad Core 3600Mhz CPU and 10GB Ram
MM 4.1.21.1871 Portable on External Hdd
TESTING MM 5.0.0.2113
Numerous Addons
User Since 2006 (Lifetime License) since 2012

forschi
Posts: 15
Joined: Fri Dec 18, 2015 11:09 am

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

Post by forschi » Sat Dec 19, 2015 7:16 am

I'm all new to the RegExp and all that but I'm looking to use this script to search a tag <Comment> for single digit numbers followed by a character anywhere in the tag. The comment tag is used for notation of songs and come in a specified format but because they dont write leading zeros the sorting gets wrong in my DJ software.
I see how this probably is quite basic, but I have no knowledge about these kind of things :(

Examples of what I'm looking to do:
1A -> 01A
1A/7B -> 01A/07B
11B -> 11B
1B/5A -> 01B/05A

Camus II

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

Post by Camus II » Sun Dec 20, 2015 6:33 am

forschi,

Name: Add zero to front of single digit with single letter in Comment field (any match)

Description: e.g. 1A -> 01A but 11A will remain the same.

Find what: \b(\d\D)
Into: Comment
Regular expression 1: checked

Replace with: 0$1

forschi
Posts: 15
Joined: Fri Dec 18, 2015 11:09 am

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

Post by forschi » Tue Dec 22, 2015 3:07 am

Camus II wrote:forschi,

Name: Add zero to front of single digit with single letter in Comment field (any match)

Description: e.g. 1A -> 01A but 11A will remain the same.

Find what: \b(\d\D)
Into: Comment
Regular expression 1: checked

Replace with: 0$1
Thank you! Just perfect. I should learn this stuff myself. Saved me lots of manual work.

kluv
Posts: 17
Joined: Mon Oct 15, 2012 3:24 am

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

Post by kluv » Fri Dec 25, 2015 10:58 pm

Merry Christmas and Happy Holidays!! Hope everyone is finding a little peace today.

I recently started using RegExp 5.0 and I'm trying to figure out how the batch presets work. For instance if I wanted to change the album and Album Artist using a batch preset would I need to create a new script or just combine two separate presets....or am I totally off on how it's suppose to work?

Thank you for any information or help you can provide.

Also thank you ZvezdanD for answering my question a few weeks ago, apologies for not doing this sooner.

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

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

Post by ZvezdanD » Sat Dec 26, 2015 3:05 am

kluv wrote:I recently started using RegExp 5.0 and I'm trying to figure out how the batch presets work. For instance if I wanted to change the album and Album Artist using a batch preset would I need to create a new script or just combine two separate presets....or am I totally off on how it's suppose to work?
It is the second one, but with some modifications - you need to use two separate presets that are marked as parts of batch. I don't know when you read the Web page of the new version, but I updated it recently with partly added information about its usage. Here is the excerpt about the batches:

"The Batch check box should be ticked on if you want to assign the selected preset to some 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 some batch from that menu, the presets that belong to it will be applied in the same order as they are sorted in the list of presets."

So, if you want to change Album and Album Artist at once you need to create one preset that will change Album and the second one that will change Album Artist, then you need to assign the same Menu and to mark both preset by checking the Batch option on.

The Usage section on the Web page contains a little more bits of information about the batch presets. Please let me know if you still have some doubts about it.
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 » Thu Jan 07, 2016 8:45 am

Can someone post the Find What and Replace With fileds for preset:
Preset ? (unsure of default number): Replace underlines with spaces in <Into Field>...
Description: Pink_Floyd\Dark_Side_of_the_Moon -> Pink Floyd\Dark Side of the Moon

In moving things around and customizing I somehow messed up the instruction info on that one, as those fields are currently blank.
I don't have the default one anymore (I think I accidentally altered the original) :roll: .

Much appreciated if you can help! :)
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]

Guest

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

Post by Guest » Thu Jan 07, 2016 9:38 am

Preset 2

reinstall script

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

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

Post by ZvezdanD » Thu Jan 07, 2016 11:11 am

MMFrLife wrote:Can someone post the Find What and Replace With fileds for preset:
Preset ? (unsure of default number): Replace underlines with spaces in <Into Field>...
It cannot be simpler than that: with the Find what you need to specify what you want to find (and replace), which is in this case the underscore ("_"), and with the Replace with you need to specify the replacement, which is the space character.

As I explained before, the RegExpReplace.ini file is a part of the add-on, it is unpacked during the installation to the same folder with the script file, it contains all predefined presets and it is not modified during the add-on's work unless you do that by yourself. Your working presets are stored in the MediaMonkey.ini file together with the installed predefined presets.

If you have modified some predefined preset in MediaMonkey.ini by accident, you could always restore it back using the RegExpReplace.ini file unless you have modified that file as well intentionally or by accident. In that case, as Guest said, just reinstall the add-on. Just don't forget to backup your own created presets before that.
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 » Thu Jan 07, 2016 1:44 pm

MMFrLife wrote:Yes, I tried all that and it didn't work, so I just couldn't remember if there was anything in the fields or not. .......... Looks like I will reinstall now and hope that is works the next time.
Ok, I figured out what happened without having to reinstall. When I started working with a particular set of files I forgot and made a path change first instead
of waiting to do path last. So, no further changes would work after that because I didn't close the RE F&R dialog box and reopen with new path/location to make further changes. Duh!

And I think the preset in question is essentially the default with only the preset order customized to 17. Anyway, all is good. Thanks 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]

theta_wave
Posts: 309
Joined: Fri Apr 13, 2007 12:54 am

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

Post by theta_wave » Tue Jan 26, 2016 11:25 pm

Hi,

Is there a way to swap the following Opus and B-number?

String Quartet No.13 in G Major, Op.106, B.192: I. Allegro moderato -> String Quartet No.13 in G Major, B.192, Op.106: I. Allegro moderato

EDIT:
Nevermind I figured it out myself (not too difficult, really)
Find: (^.+)(\,\s)(\w+.\d+)(\,\s)(\w+.\d+)(.+$)
Replace: $1$2$5$4$3$6 or $1\, $5\, $3$6
MM Gold Lifetime since 2.5.5.998
Computer: Lenovo Y580 System: Win7 Ultimate x64 SP1 / Arch Linux Mediamonkey 4: w/ Monkeyrok 5.6, Minilyrics 1.4b, iMonkey Skin

macmcd
Posts: 96
Joined: Wed Jul 09, 2008 7:22 am

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

Post by macmcd » Wed Feb 03, 2016 3:49 am

Hello,

I've just started using version 5 after donating and when I select a new preset I receive the following error message:

Error executing script event.
Object required: "ic"

I am still able to execute the new script but the preview window has not updated from the previous preset. The error also occurs if you select a new value from any of the fields within the preset e.g. 'Into' or 'From'. Is there a simple fix for this before I try a reinstall as I have updated a number of the presets?

Thanks,
Mac.

ZvezdanD
Posts: 3087
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 Feb 03, 2016 9:20 am

macmcd wrote:Is there a simple fix for this before I try a reinstall as I have updated a number of the presets?
I cannot reproduce this problem, maybe it could help if you describe what you did exactly before it happened. Also, it would be nice if you post a screenshot of the error message where i could see the line number in the code where is the error.

I think it would be enough just to restart the program. I doubt that the reinstall of the add-on could change anything, but before that you could export your presets using the Manage Presets dialog box which you could import latter.
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

macmcd
Posts: 96
Joined: Wed Jul 09, 2008 7:22 am

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

Post by macmcd » Wed Feb 03, 2016 5:01 pm

This may help. I opened RFR with preset 235/572 'Capitilize <Into Field> (ASCII, Latin-1, Latin-2 & Cyrillic)... as the last used script with 'Album' in the 'Into:' field. I successfully capitilised the Album names and then selected 'Title' in the 'Into:' field receiving the following:

Error #424 - Microsoft VBScript runtime error
Object required: "ic"
File: "C:\Users\Mac\AppData\Roaming\MediaMonkey\Scripts\Auto\RegExpReplace.vbs", Line: 38, Column: 194376

I have restarted both the computer and MediaMonkey a number of times prior to this latest error message. Thanks for the 'Manage Presets' tip.

Post Reply