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

linn
Posts: 170
Joined: Wed Sep 06, 2006 3:59 am

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-10)[MM2+3]

Post by linn »

ZvezdanD wrote:
linn wrote:I want to copy the contents of lyrics to comment field , about 500 tracks, i tried all sorts of masks but i can;t get it right.
Thanks
Select all track which you want to modify, then choose Edit /Tag Manipulation Presets / Copy <Timestamp> to <Added>..., then set Source field: Lyrics, Destination field: Comment.
I can't find this preset, just got the latest version , but i still can't see this mask.
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-10)[MM2+3]

Post by ZvezdanD »

linn wrote:
ZvezdanD wrote:
linn wrote:I want to copy the contents of lyrics to comment field , about 500 tracks, i tried all sorts of masks but i can;t get it right.
Thanks
Select all track which you want to modify, then choose Edit /Tag Manipulation Presets / Copy <Timestamp> to <Added>..., then set Source field: Lyrics, Destination field: Comment.
I can't find this preset, just got the latest version , but i still can't see this mask.
Well, I really don't know where is the problem. How many presets do you have installed? Have you installed some older version of this add-on before the latest one and did you choose the option to remove the add-on settings during the re-installation? Here are settings for this preset, it is generic one:
Find what: ^.*
Into: Comment
RegExp 1: checked
Replace with: .*
From: Lyrics
RegExp 2: checked

Maybe it was just some kind of problem with preset names, because preset names are updated whenever you change Into and/or From fields in the RegExp Find and Replace dialog box.

You could also try the new update of this add-on: 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.
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: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-14)[MM2+3]

Post by ZvezdanD »

Just to explain some things (maybe this could go to the Information section of the first post).

1. If you have turned on the ""Show dialog box for adjusting of the preset..." option in the Options dialog box and if you have some preset with <Into Field> or <From Field> tags in its name - this preset will be now displayed in the menu with that tags, e.g. Copy <From Field> to <Into Field>... (with ellipsis on the end). If you select such preset, the additional dialog box for its adjusting will be opened.

2. If you have turned off the ""Show dialog box for adjusting of the preset..." option in the Options dialog box and if you have some preset with <Into Field> or <From Field> tags in its name - this preset will be displayed in the menu with tags replaced with actual field names specified with Into and/or From dropdown listboxes, e.g. Copy <Timestampt> to <Added> (with removed ellipsis from the end of the preset name). If you select such preset, the additional dialog box for its adjusting will NOT be opened, but the confirmation dialog box will be displayed (if the related option is turned on) or the preset will be executed directly without any asking (if the confirmation option is turned off).

3. If you have some preset without <Into Field> and <From Field> tags in its name - this preset will be displayed in the menu as it is, e.g. Copy Timestamp to Added. If you select such preset, the additional dialog box for its adjusting will NOT be opened, but the confirmation dialog box will be displayed (if the related option is turned on) or the preset will be executed directly without any asking (if the confirmation option is turned off).
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
linn
Posts: 170
Joined: Wed Sep 06, 2006 3:59 am

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-10)[MM2+3]

Post by linn »

linn wrote:I want to copy the contents of lyrics to comment field , about 500 tracks, i tried all sorts of masks but i can;t get it right.
Thanks
, it is generic one:
Find what: ^.*
Into: Comment
RegExp 1: checked
Replace with: .*
From: Lyrics
RegExp 2: checked
These settings didn't work too well to start with ,but if i run the preset "remove trailing/leading spaces "first on the lyrics all goes well.
So thanks ,
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-10)[MM2+3]

Post by ZvezdanD »

linn wrote:
linn wrote:I want to copy the contents of lyrics to comment field , about 500 tracks, i tried all sorts of masks but i can;t get it right.
Thanks
, it is generic one:
Find what: ^.*
Into: Comment
RegExp 1: checked
Replace with: .*
From: Lyrics
RegExp 2: checked
These settings didn't work too well to start with ,but if i run the preset "remove trailing/leading spaces "first on the lyrics all goes well.
Thanks for the report. You are right, these settings could be used only with single-line fields. If you want to copy some multi-line field like Lyrics, you should use:
Find what: ^(\n|.)*
Replace with: (\n|.)*
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
linn
Posts: 170
Joined: Wed Sep 06, 2006 3:59 am

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-10)[MM2+3]

Post by linn »

ZvezdanD wrote:
linn wrote: These settings didn't work too well to start with ,but if i run the preset "remove trailing/leading spaces "first on the lyrics all goes well.
Thanks for the report. You are right, these settings could be used only with single-line fields. If you want to copy some multi-line field like Lyrics, you should use:
Find what: ^(\n|.)*
Replace with: (\n|.)*
Perfect,thanks
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-14)[MM2+3]

Post by ZvezdanD »

If someone is interested, here are some new useful presets for this add-on, they will be included with its next version:
Preset: Add space character after ";" separator in multi-item <Into field> if missing
Description: John Lennon;Paul McCartney -> John Lennon; Paul McCartney
Find what: ;(?=\S)
Into: whatever, e.g. Involved people
RegExp 1: checked
Replace with: ; (one space character after ";", i.e. "; ")

Preset: Remove space character after ";" separator in multi-item <Into field>
Description: John Lennon; Paul McCartney -> John Lennon;Paul McCartney
Find what: ;\s+
Into: whatever, e.g. Involved people
RegExp 1: checked
Replace with: ; (without space character, just ";")
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
barkoz
Posts: 121
Joined: Fri May 02, 2008 5:58 pm
Location: Sydney, Australia

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-14)[MM2+3]

Post by barkoz »

Mate thanks for the new version, this is my most prized script, couldn't do without it. I have a question before I update though. I have about 280 presets and want to know if it's possible to update adding your new ones without losing the ones I have added as it took a long time to get them the way I have. I can probably do without new presets if I have to. But the new script is a must.
Cheers from OZ
barkoz
Posts: 121
Joined: Fri May 02, 2008 5:58 pm
Location: Sydney, Australia

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-14)[MM2+3]

Post by barkoz »

BTW if you are wondering why I have so many presets..... I use custom fields for Gender (Male or Female Vocals), Language and Country. Saves an awful lot of typing and I have tagged around 140,000 tracks with this little baby, It does everything but make me a cup of tea LOL
-SuperFunk-
Posts: 45
Joined: Tue Aug 05, 2008 4:16 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by -SuperFunk- »

Guest wrote:
-SuperFunk- wrote:Yes, but that wouldn't solve my problem.
the following item won't be added to the list
Cuban Pop; Alternative/ Indie Rock; Adult Alternative Pop/ Rock; Contemporary Pop/ Rock; Cuban Traditions; Cuban Jazz; Latin Jazz; World Fusion
-> no 'Afro-cuban jazz', only 'Cuban Jazz' but the line doesn't begin with 'cuban jazz'
I just tried with your string entered into Grouping field and such track is correctly entered into autoplaylist. Did you try exactly this:
Image
I use this trick now,
but i came across a new problem:

If I try this for the style 'Fusion' it doesn't work:
I get for example:
Alternative/ Indie Rock; Adult Alternative Pop/ Rock; Contemporary Celtic; Celtic Fusion; Celtic New Age; Irish Folk; Celtic; Celtic Pop
Alternative/ Indie Rock; Alternative Pop/ Rock; Ethnic Fusion
Afro-Cuban Jazz; Afro-Cuban; Latin Jazz; World Fusion; Cuban Traditions
Guitar Virtuoso; Jazz-Rock; Fusion; Guitar Jazz; Jazz Instrument
It's really weird! why is this.. ? :evil:

EDIT: same for 'Big Band'
Crossover Jazz; Modern Big Band; Jazz-Pop; Trumpet Jazz; Jazz Instrument; Disco
& 'Swing'
Retro Swing; Alternative/ Indie Rock; Latin Pop
I've tried the 'Cuban Jazz' again and that works fine, like it should.

The difference is, that the styles I tried lately are only one word
+ for the cuban jazz example: "afro-cuban jazz" could be seen as 2 parts (not 3):
"afro-cuban" (1word!!) and "jazz"
MM is able to filter "afro-cuban" from "cuban" this way
that's why the previous trick from the guest worked and now it doesn't.
Is there a way around this?
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.0 w/ 194 presets (2010-04-14)[MM2+3]

Post by ZvezdanD »

barkoz wrote:I have about 280 presets and want to know if it's possible to update adding your new ones without losing the ones I have added as it took a long time to get them the way I have.
Of course it is possible, but I suggest another approach:
1. Export all presets (Edit / RegExp Export/Import / make sure that all presets are checked and click on the Export button);
2. Uninstall old version of the add-on and when it ask "Do you want to remove RegExp Find and Replace settings as well?" choose Yes;
3. Install new version of add-on;
4. Choose Edit / RegExp Export/Import / select File option and specify .ini file which you made in the 1. step;
5. Check on your own presets and leave other presets unchecked, then click on the Import button.

I am suggesting this approach because many included presets are modified to support new functionality of this add-on. For example, the "Clear the Comment field" is renamed to "Clear <Into Field>..." or "Copy the Date when the file is last modified to the Date added field" is renamed to "Copy <From Field> to <Into Field>...".
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: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by ZvezdanD »

-SuperFunk- wrote:If I try this for the style 'Fusion' it doesn't work
How about to post your screen-shot of the Autoplaylists criteria dialog box?

You need to specify two criteria for each style and you need to select Match Any option. For example, for "Fusion" you need to specify "Grouping" "contains" "; Fusion" and "Grouping" "starts with" "Fusion".
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
-SuperFunk-
Posts: 45
Joined: Tue Aug 05, 2008 4:16 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by -SuperFunk- »

ZvezdanD wrote:
-SuperFunk- wrote:If I try this for the style 'Fusion' it doesn't work
How about to post your screen-shot of the Autoplaylists criteria dialog box?

You need to specify two criteria for each style and you need to select Match Any option. For example, for "Fusion" you need to specify "Grouping" "contains" "; Fusion" and "Grouping" "starts with" "Fusion".
I use the dutch MM, but I did like you said:
Image
'enkele'= any
'start met' = start with
'bevat' = contains

The Result is:
Image

You could try it yourself.
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by ZvezdanD »

-SuperFunk- wrote:You could try it yourself.
Sorry, you are right. It is obliviously a bug in the MM program itself. You could type everything in the front of the "; Fusion", e.g. "blahblah; Fusion" and it will return all tracks that contains "Fusion", which is ridiculous. You could try to report this in the Bugs forum, but I am not sure if MM developers visit that forum at all.

In the meantime, you could try the Magic Nodes add-on with the following mask:

Code: Select all

<Group|Name:Genres>\<Group|Name:Fusion>\Fusion 2|Child of:Playlists|Position:Child|Filter:'; ' || <Grouping> || ';' Like '%; Fusion;%'
This mask will generate static playlist that contains only tracks with "Fusion" style, without "Ethnic Fusion", "World Fusion" or similar.
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
-SuperFunk-
Posts: 45
Joined: Tue Aug 05, 2008 4:16 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by -SuperFunk- »

ZvezdanD wrote:
-SuperFunk- wrote:You could try it yourself.
Sorry, you are right. It is obliviously a bug in the MM program itself. You could type everything in the front of the "; Fusion", e.g. "blahblah; Fusion" and it will return all tracks that contains "Fusion", which is ridiculous. You could try to report this in the Bugs forum, but I am not sure if MM developers visit that forum at all.

In the meantime, you could try the Magic Nodes add-on with the following mask:

Code: Select all

<Group|Name:Genres>\<Group|Name:Fusion>\Fusion 2|Child of:Playlists|Position:Child|Filter:'; ' || <Grouping> || ';' Like '%; Fusion;%'
This mask will generate static playlist that contains only tracks with "Fusion" style, without "Ethnic Fusion", "World Fusion" or similar.
Thanks but I think I'll use alternative names for these genres, like that I only will have to scan these files easily with a preset from this script

Code: Select all

Find what: (^|; )"here comes the style"
RegExp1: checked
Replace with: $1"here comes the alternative"
(previous page)

Since my library continues to grow and more information is added, I find it important to keep the auto-generating option available. :wink:
Post Reply