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

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

some1
Posts: 91
Joined: Tue Jul 03, 2007 3:10 am

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by some1 »

Are you able to select/do/script/automate more than one of theses at once?
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by ZvezdanD »

some1 wrote:Are you able to select/do/script/automate more than one of theses at once?
Currently it is not possible, but it is on my To-Do List:
  • possibility to assign presets to some Action Group, so you could automatically execute two or more presets in batch (in that case you would be able to modify two or more fields at once);
  • possibility to assign presets to some Menu Group, so instead of one big menu with all 200+ presets you would get presets hierarchy on two menu levels, e.g. Basic menu with presets Clear <Into Field>, Copy <From Field> to <Into Field> and so on, then Track/Disc Number menu with presets Add leading zero to single-digit Track number, Increase Track number by specified value and so on, and so on;
  • possibility to specify <From Field> in Replace with string when VBScript expression option is enabled, which would allow use of more generic presets, e.g. the current Add Album name to the end of <Into Field> as last item using ";" as separator preset has hard-coded Album field into preset, but with the new option it would be possible to use same preset for any field, not only Album;
  • possibility to specify which action would be applied (Replace All, Keep/Select Matched/To Replace) when you choose some preset from the main menu or toolbar (currently it is only Replace All);
  • possibility to apply some preset to currently playing track (currently it could be applied only to selected/visible tracks).
Before someone asks when this list would be implemented, please read the first post from the previous page.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by declan »

That sounds great. Will it be possible to do run two presets on one field at the same time?
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by ZvezdanD »

declan wrote:Will it be possible to do run two presets on one field at the same time?
Yes, but if you want modification of just one field, most probably you could do that already with the existing version using some VBScript expression.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
davidbspalding
Posts: 222
Joined: Fri Jan 08, 2010 3:53 pm
Location: Durham, NC

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by davidbspalding »

I noticed on my small portable that the dialog box has text that doesn't wrap. It's a Thinkpad X32 with 1024x768 native resolution (I know, it's small). I searched the thread and didn't notice any reports of this

Image

I'd be happy to donate to you (I like giving some lunch money to open source efforts that I benefit from), but your current methods are an obstacle. Wire transfers cost me $25 to perform, and inter-account transfers (commonly where I own both accounts) require an ABA routing number and account. Paypal, even if through intermediaries willing to accept on your behalf, is one obvious solution.
«Tell me and I'll forget; show me and I may remember; involve me and I'll understand.» Chinese proverb
T43 XP-SP3 2GB RAM, dual hard drives, MM 4.0.3 Gold; Ipod Classic 7G v2.0.4, Nano 3G v1.1.3.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by ZvezdanD »

davidbspalding wrote:I noticed on my small portable that the dialog box has text that doesn't wrap.
Do you have such problem only with this dialog box? I suppose you are using a large screen font or you increased font size in the Options, but in that case you would get truncated text even in Find & Replace dialog box.

Thanks for considering a possibility to donate. You see, I would rather use PayPal instead of direct bank transfer, but unfortunately it is not available in my country. Well, if you are really interested to donate using PayPal, maybe I could see with my friend who is living in England to receive money on his PayPal account.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
davidbspalding
Posts: 222
Joined: Fri Jan 08, 2010 3:53 pm
Location: Durham, NC

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by davidbspalding »

ZvezdanD wrote:
davidbspalding wrote:I noticed on my small portable that the dialog box has text that doesn't wrap.
Do you have such problem only with this dialog box? I suppose you are using a large screen font or you increased font size in the Options, but in that case you would get truncated text even in Find & Replace dialog box.
Good call, I usually have Message Box text at 9pt, but on this system, had display DPI at 110%; I thought I'd left it at default. I reset it and shutdown this morning, will check again with dpi at default of 96, and Message Box left at 9pt (8pt tends to be too small for my aging eyes :roll: ).

UPDATE:
Yep, that was it, the custom DPI setting in Windows Display Advanced Properties. User-inflicted issue. :oops:
«Tell me and I'll forget; show me and I may remember; involve me and I'll understand.» Chinese proverb
T43 XP-SP3 2GB RAM, dual hard drives, MM 4.0.3 Gold; Ipod Classic 7G v2.0.4, Nano 3G v1.1.3.
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by declan »

ZvezdanD wrote:
declan wrote:Will it be possible to do run two presets on one field at the same time?
Yes, but if you want modification of just one field, most probably you could do that already with the existing version using some VBScript expression.
I want to copy info into a field, then edit it.

So I use 2 at the moment -

1. adds Composer, Conductor and involved people into Tempo field giving say - John Lennon; Paul McCartney; George Martin; Singer: John Lennon; Guitar: John Lennon; Guitar: George Harrison; Bass: Paul McCartney; Drums: Ringo Starr

2 removes the instruments so it becomes - John Lennon; Paul McCartney; George Martin; George Harrison; Ringo Starr
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by ZvezdanD »

declan wrote:I want to copy info into a field, then edit it.

So I use 2 at the moment
I am not sure that understand what you want exactly. If you post settings of those two presets that you are using at the moment, I would see if they could be combined.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by declan »

Setting one -

Find: ^.*
Replace: oSongData.Author & "; "& oSongData.Conductor & "; " & oSongData.Genre

Setting two

Find: (?:(Singer:\.?|Bass:\.?|Guitar:\.?|Drums:\.?))\s
Replace: " " & MapArray(Array("$1", "", "$2", "", "$3", ""))
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by ZvezdanD »

declan wrote:Setting one -

Find: ^.*
Replace: oSongData.Author & "; "& oSongData.Conductor & "; " & oSongData.Genre

Setting two

Find: (?:(Singer:\.?|Bass:\.?|Guitar:\.?|Drums:\.?))\s
Replace: " " & MapArray(Array("$1", "", "$2", "", "$3", ""))
If you want these two presets combined, here is the corresponding transformation:
Find what: ^.*
Replace with: RegSub(oSongData.Author & "; "& oSongData.Conductor & "; " & oSongData.Genre, "(?:(Singer:\.?|Bass:\.?|Guitar:\.?|Drums:\.?))\s", " " & MapArray(Array("$1", "", "$2", "", "$3", "")))

However, I think that you have several errors. Firstly, you said that you want Involved people, then you have Genre instead. Also, your MapArray function has 3 replacement pairs, but your Find string has only one capture group - you could use just one space character for Replace with string in the second preset instead. What if you have empty Conductor? You would get two "; " in row. To avoid that, you should write the first preset as:

Code: Select all

oSongData.Author & IIf(oSongData.Author <> "" And oSongData.Conductor & oSongData.Genre <> "", "; ", "") & oSongData.Conductor & IIf(oSongData.Author & oSongData.Conductor <> "" And oSongData.Genre <> "", "; ", "") & oSongData.Genre
There is one more serious problem - if you use Involved people instead of Genre, with such presets you would get duplicated names: John Lennon; Paul McCartney; George Martin; John Lennon; John Lennon; George Harrison; Paul McCartney; Ringo Starr. It could be resolved very easily if you have single-item fields, but with multi-item fields it could be really complicated. If you are interested about that problem, maybe you could take a look at the "Remove item with Artist name from multi-item Genre" preset.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Kevinowpb
Posts: 129
Joined: Sat Dec 22, 2007 10:18 am
Location: West Palm Beach
Contact:

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by Kevinowpb »

I am getting an error # 2147418113 SongDB.SDBStringList
List Index Out of Bounds (0)
File: "C:\Program Files\MediaMonkey\Scripts\Auto\RegExpReplace.vbs"", Line: 432, column: 8


any ideas?
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM

Post by ZvezdanD »

Kevinowpb wrote:I am getting an error # 2147418113 SongDB.SDBStringList
List Index Out of Bounds (0)
File: "C:\Program Files\MediaMonkey\Scripts\Auto\RegExpReplace.vbs"", Line: 432, column: 8


any ideas?
It seems that you have corrupted RegExpPresets section in the MediaMonkey.ini file. It could be helpful if you send me that file in PM, at least the mentioned section.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 217 presets (2010-12-02)[MM

Post by ZvezdanD »

There is the new release: 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.
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.1 / 5.4.1  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.8 / 4.0.1  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.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Davo
Posts: 431
Joined: Tue Nov 06, 2007 9:00 pm
Location: Australia

Re: RegExp Find & Replace 4.0 w/ 217 presets (2010-12-02)[MM

Post by Davo »

Thank you again for this great script especially the presets which let the RegExp ignorant like myself still take advantage of the editing features.
I would appreciate it if you could show me how to remove parentheses (or Brackets) from words. I've tried but i cannot figure this out.

Regards - David
David
____________________________
Windows 10
MM 5 Beta
Post Reply