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

sperk
Posts: 90
Joined: Wed Oct 11, 2006 1:52 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by sperk »

Hi,
is there any way to swap text separated by a dash in a given field?
For example, if in "title" you had "long days night - the beatles" could you reverse it to "the beatles - long days night"?
Thanks!!
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by ZvezdanD »

sperk wrote:is there any way to swap text separated by a dash in a given field?
Find what: ^(.*?)(\s+-\s+)(.*)
Into: given field
Regular expression 1: checked
Replace with: $3$2$1
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
sperk
Posts: 90
Joined: Wed Oct 11, 2006 1:52 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by sperk »

Thanks for replying but I get "Expression error!" in Replacement and Result. Do you have any any suggestions?
Thanks!!
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by ZvezdanD »

sperk wrote:Thanks for replying but I get "Expression error!" in Replacement and Result. Do you have any any suggestions?
Did you click on the New button before entering the suggested settings, i.e. do you have VBScript expression unchecked?
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
sperk
Posts: 90
Joined: Wed Oct 11, 2006 1:52 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by sperk »

That did the trick! Thanks.
One thing I was wondering about and it's probably somewhere in the 45 pages of this thread but it's difficult to find...is there any way to access MM while the RegExp window is open?
For example, if I highlight one track and open RE and do an operation, I have to close RE to select other tracks. I'm sure you know what I mean, RE always stays like a top window and I can't get to the window below.
Thanks!!
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by ZvezdanD »

sperk wrote:is there any way to access MM while the RegExp window is open?
Tools > Options > General, RegExp Find and Replace > Modeless Find & Replace dialog box (allowed access to other parts of the program)
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
PaganRuler
Posts: 1
Joined: Sun Dec 12, 2010 4:52 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by PaganRuler »

Hi,

I was looking at another plugin to fix some errors from FreeDB with relation to compilations and it sent me to this thread.

What I have is a selection of compilation albums where the title is setup as <Artist> / <Title> or the other way around etc.

I obviously want to quickly get the Artist into the Artist column and Title into the Title column but this plugin seems pretty in depth...

Is there a preset in the 217 that does this already????
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by ZvezdanD »

PaganRuler wrote:What I have is a selection of compilation albums where the title is setup as <Artist> / <Title> or the other way around etc.

I obviously want to quickly get the Artist into the Artist column and Title into the Title column
You could use two existing presets:
1. "Assign the begin of Title before " - " to <Into Field> (only if exists)...", just specify Artist in Into combo box and replace " - " with " / " in Replace with string, like this:

Code: Select all

IIf(InStr(oSongData.Title, " / ") > 0, RTrim(Left(oSongData.Title, InStr(oSongData.Title, " / "))), "$&")
2. "Remove the begin of <Into Field> before (and including) specified string...", just specify Title in Into combo box and replace "feat. " with " / " in Find what string, like this:

Code: Select all

^(.|\s)*?<String Caption="Trim string before" Value=" / ">
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
murraynt
Posts: 4
Joined: Thu Jun 02, 2011 5:15 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by murraynt »

Alright guys.

I have been using this script and its brilliant.
The one thing i haven't found out how to do is select all heading under file and replace.

For example lets just say i have a website address that i want to take out i have to do it under each heading eg Artist, composer, genre as the website maybe under multiple heading and places.

is there an option to select everything at once?

Have to say is is one of the best scripts i have com across so far along with Genre finer and backup 5.8

Thanks for any replies guys/girls
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by ZvezdanD »

murraynt wrote:is there an option to select everything at once?
No, it is not currently possible, but it is on to-do list.
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
murraynt
Posts: 4
Joined: Thu Jun 02, 2011 5:15 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by murraynt »

Thatss no problem mate. A few seconds more wont kill me.
kiwichick
Posts: 331
Joined: Tue Jul 21, 2009 6:35 am

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by kiwichick »

Hi there, Would it be possible, in a future update, to add a new field to go with MM4's field for the type of media added - music, video, music video, podcast, etc? At the moment RegExp has a field called 'Type' which is for the file extension. I think this was the field name in MM3 but in MM4 'Type' is for media. The file extension field is now called 'Extension'. Cheers.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by ZvezdanD »

kiwichick wrote:Hi there, Would it be possible, in a future update, to add a new field to go with MM4's field for the type of media added - music, video, music video, podcast, etc? At the moment RegExp has a field called 'Type' which is for the file extension. I think this was the field name in MM3 but in MM4 'Type' is for media. The file extension field is now called 'Extension'. Cheers.
It would be possible to rename that field, but I am afraid that it would break compatibility with the existing presets. Anyway, I think I would do that with the next update.
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
kiwichick
Posts: 331
Joined: Tue Jul 21, 2009 6:35 am

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by kiwichick »

Thanks ZvezdanD, Sorry I didn't think about existing presets. But I guess renaming the new field toType wouldn't really be necessary. That only matters for continuity between what MM and REFR call the fields. Just having the extra field for the media type, regardless of what it's called (maybe MediaType instead of Type?), would be great!!!
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 4.1 w/ 217 presets (2011-03-03) [M

Post by ZvezdanD »

kiwichick wrote:maybe MediaType instead of Type?
I like your suggestion, but maybe it would be better to call it Track Type since that term is used in MM API (http://www.mediamonkey.com/wiki/index.p ... :TrackType). Maybe we should wait and see how MM developers would call it in Auto-Organize, so I could use that term. Anyway, you should know that you would get/set only numerical values with that field (0-7), which is not very user-friendly. I am just curious, why would you need that field with this add-on anyway? If you need batch modification of that field for some set of tracks you could just use Properties dialog 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.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
Post Reply