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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

Postby Spix » Mon Nov 27, 2017 3:42 am

Thank you for your quick response!

I'm not sure whether I got it:
I don't want to use a preset at all but just use regular expressions and I think I need regular expression 2 to move a (part of a) string from field Tittle to field Artist??
I tried with 2 capturing groups "(.*)" but with the same result:

Find what: "(.*) - (.*)" | Into: Artist | Regular expression 1: marked | without "Full" and "Find whole words only"
Original: "Unknown Artist"

Replace with: "$2" | From: Title | Regular expression 2: marked | without "Full", "VBScript", "Match case", "Backward search direction"
Replacement: "myTitle - myBand"
Result: "Unknown Artist"


Best regards
Spix
Spix
 
Posts: 6
Joined: Tue Mar 21, 2017 3:49 pm

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

Postby ZvezdanD » Mon Nov 27, 2017 12:52 pm

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.

By the way, the donation-only version currently has 28 moving presets that modify both source and destination fields at once, including "Move the begin of <From Field> before leftmost specified string to <Into Field>".
Magic Nodes 4.3.2/5.1 RegExp Find & Replace 4.4.8/5.1  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1/5.3.6  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
ZvezdanD
 
Posts: 3024
Joined: Thu Jun 08, 2006 7:40 pm

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

Postby Spix » Tue Nov 28, 2017 7:04 pm

Hi,

thank you for yours answer!

Still I don't understand, why my approach with regular expressions does not work (for the first part of moving, i.e. copying the artist to the artist field)!?
Do you have an idea why it is not working? I'm still interested to make it work with regular expressions!

For this special problem I found an easy solution with the help of "Auto-Organize of Files..." and "Auto-Tag from File..."

Best regards
Spix
Spix
 
Posts: 6
Joined: Tue Mar 21, 2017 3:49 pm

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

Postby ZvezdanD » Wed Nov 29, 2017 2:00 am

I don't understand why you don't want to use the predefined "Assign" preset that I mentioned, which already does what you want. Presets are nothing more than saved replacement settings, using regular expressions or not. So, if you want to know how its settings looks, you could just choose it from the Preset combo box.

By the way, the Usage section of the add-on's Web page contains explanation about the purpose of Find what/Replace with strings and how they could be used:
"The first control in the next (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 first control in the next (replacing) group is the Replace with combo box which could be used for specifying a string that we want to use for the replacement."

Now, think again what you want to replace and what you want to use as a replacement.
Magic Nodes 4.3.2/5.1 RegExp Find & Replace 4.4.8/5.1  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1/5.3.6  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
ZvezdanD
 
Posts: 3024
Joined: Thu Jun 08, 2006 7:40 pm

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

Postby beg » Sat Jan 27, 2018 1:47 pm

Hi,

I'd need your help again (I know, it's a weired one - working with LP tranfers..) I was looking a lot in the the presets but could not find something like "copy/appending the last number of characters from the right from one given tag to the beginning of another..)

I need to add the last character from Album to the beginning of tracknumber.

Old Tracknumber is: 1
Old Album is: xxxxA

New Tracknumber should be: A1

Since I am not really experienced with all the expressions and possible switches, please give a complete explenation of how to use/add what and where..

Thanks a lot!
beg
 
Posts: 173
Joined: Wed Feb 04, 2009 12:36 pm

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

Postby ZvezdanD » Sat Jan 27, 2018 3:56 pm

beg wrote:I need to add the last character from Album to the beginning of tracknumber.

There is no single predefined preset in the current version that could do what you want, but you could use a batch with the following two presets:
1. "Copy specified number of characters from the end of <From Field> to <Into Field>..." with turned on "Append to the end of destination field";
2. "Move specified number of characters from the end to the begin of <Into Field>..."

Or, you could just modify the first mentioned preset to avoid using of batch:
Find what: <If Caption="Assign to the field" Value=0 ID=1>^.*<Else Caption="Append to:"><If Caption="the begin of field" Value=1 ID=2>^<Else Caption="the end of field">$<End If><End If>
Replace with: <If ID:1><Else>IIf(Len("$_") > 0 And Len(SetVar(0, <End If>Right(<From Field>, <Number Caption="Characters to copy" Value="1">)<If ID:1><Else>)) > 0, <If ID:2>GetVar(0) & <End If>"<String Caption="Separator" Value=" - ">", "")<If ID:2><Else> & GetVar(0)<End If><End If>
Magic Nodes 4.3.2/5.1 RegExp Find & Replace 4.4.8/5.1  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1/5.3.6  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
ZvezdanD
 
Posts: 3024
Joined: Thu Jun 08, 2006 7:40 pm

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

Postby beg » Sat Jan 27, 2018 6:12 pm

Thank you very much for your help - I used the modified version which I saved and it worked great!

It's a pitty those rules are a bit tricky and/or I am to ignorant to learn them..
beg
 
Posts: 173
Joined: Wed Feb 04, 2009 12:36 pm

Previous

Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 29 guests