RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
-
- Posts: 87
- Joined: Fri Jul 27, 2007 7:58 am
- Location: Leiden, The Netherlands
Can't install RegExp F&R w/o scripts. MM3.1 problem?
When I try to install RegExp F&R without the 101 sample presets I get the error message
Error #-2147419113 - SongsDB.SDBStringlist
List index out of bounds (0)
File ....\MM\scripts\Auto\RegExpReplace.vbs
There is not the RegExp menu item under Edit.
Installing with the presets seems to be o.k. (so I'll try them anyway )
I just updated to MM 3.1. I'm also using MagigNodes. I didn't use RegExp before (didn't know about it).
It seems a very intersting script. I have been using Mp3Tag extensively.
Error #-2147419113 - SongsDB.SDBStringlist
List index out of bounds (0)
File ....\MM\scripts\Auto\RegExpReplace.vbs
There is not the RegExp menu item under Edit.
Installing with the presets seems to be o.k. (so I'll try them anyway )
I just updated to MM 3.1. I'm also using MagigNodes. I didn't use RegExp before (didn't know about it).
It seems a very intersting script. I have been using Mp3Tag extensively.
-- RabanePaco
MM 4.1.14.1813, RegExp Find & Replace
System: Windows 10, 64 bits, all updates. Intel(R) Core(TM) i5, 3.20GHz, 4 Core(s), 8 GB main memory, 250 GB SSD, etc.
NetGear NAS 2 TB, 822 albums, 14+ k tracks, 110 GB, 10000 hours playinmg time.
SqueezeBox Duet, iPod (classic)
MM 4.1.14.1813, RegExp Find & Replace
System: Windows 10, 64 bits, all updates. Intel(R) Core(TM) i5, 3.20GHz, 4 Core(s), 8 GB main memory, 250 GB SSD, etc.
NetGear NAS 2 TB, 822 albums, 14+ k tracks, 110 GB, 10000 hours playinmg time.
SqueezeBox Duet, iPod (classic)
Re: Can't install RegExp F&R w/o scripts. MM3.1 problem?
Thanks for the report. There is a new release: v3.5.1 - 2009-06-18RabanePaco wrote:When I try to install RegExp F&R without the 101 sample presets I get the error message
- Fixed: error during start-up if none preset exists.
● 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
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Just wondering if it is possible to append one field with another field. I would like to take the information in fields such as "Mood" and "Tempo" and append the data in the field to the Grouping field, ideally putting a comma and then a space before the data is added to the Grouping field.
Version: MediaMonkey 3.1.0.1236
Syncs iPod Touch 2nd Gen (firmware 2.2) and SD cards via card reader
(Touch also syncs with iTunes on a Mac, OS X 10.5, set manage podcasts, apps, photos, contacts & calendar, but NOT music)
Syncs iPod Touch 2nd Gen (firmware 2.2) and SD cards via card reader
(Touch also syncs with iTunes on a Mac, OS X 10.5, set manage podcasts, apps, photos, contacts & calendar, but NOT music)
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Of course this is possible, you already have several predefined presets which combines two or more fields into one field, e.g. "Add the Track number to the begin of the Title". Here are settings for your example:stutes wrote:Just wondering if it is possible to append one field with another field. I would like to take the information in fields such as "Mood" and "Tempo" and append the data in the field to the Grouping field, ideally putting a comma and then a space before the data is added to the Grouping field.
Find what:
Code: Select all
^.*
Regular expression 1: checked
Replace with:
Code: Select all
"$&" & IIf(Len(oSongData.Mood) > 0 And Len("$&") > 0, ", ", "") & oSongData.Mood & IIf(Len(oSongData.Tempo) > 0 And Len("$&" & oSongData.Mood) > 0, ", ", "") & oSongData.Tempo
The Replace with expression could be much simpler if you remove checking for empty fields, i.e. if you have all fields entered.
● 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
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
ZvezdanD, thank you for the reply. I figured RegExp could do this, but I couldn't figure out how to make it work with the fields I wanted to work with. I've no knowledge of VBscript.
I don''t think I need it to check for empty fields, and I didn't realize I could get it to append BOTH the Mood AND Tempo fields AT ONCE into the Grouping field—that's pretty cool! I was assuming I'd have to run it once to append the Mood to Grouping and then again to append the Tempo to Grouping.
I was also hoping to do the same thing with Custom 2 and Custom 3 (again, no need to check for empty fields as far I as I can tell... unless empty fields cause problems), and append the data in those fields to the Grouping field.
Would I be correct in assuming that the code for Custom 2 and 3 would look something like this?:
I don''t think I need it to check for empty fields, and I didn't realize I could get it to append BOTH the Mood AND Tempo fields AT ONCE into the Grouping field—that's pretty cool! I was assuming I'd have to run it once to append the Mood to Grouping and then again to append the Tempo to Grouping.
I was also hoping to do the same thing with Custom 2 and Custom 3 (again, no need to check for empty fields as far I as I can tell... unless empty fields cause problems), and append the data in those fields to the Grouping field.
Would I be correct in assuming that the code for Custom 2 and 3 would look something like this?:
Code: Select all
"$&" & IIf(Len(oSongData.Custom2) > 0 And Len("$&") > 0, ", ", "") & oSongData.Custom2 & IIf(Len(oSongData.Custom3) > 0 And Len("$&" & oSongData.Custom2) > 0, ", ", "") & oSongData.Custom3
Version: MediaMonkey 3.1.0.1236
Syncs iPod Touch 2nd Gen (firmware 2.2) and SD cards via card reader
(Touch also syncs with iTunes on a Mac, OS X 10.5, set manage podcasts, apps, photos, contacts & calendar, but NOT music)
Syncs iPod Touch 2nd Gen (firmware 2.2) and SD cards via card reader
(Touch also syncs with iTunes on a Mac, OS X 10.5, set manage podcasts, apps, photos, contacts & calendar, but NOT music)
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Yes, your Replace with string is correct. However, if you don't want to check for empty fields, you could write previous two presets as one, i.e. you could append Mood, Tempo, Custom 2 and Custom 3 in one go:stutes wrote:Would I be correct in assuming that the code for Custom 2 and 3 would look something like this?:Code: Select all
"$&" & IIf(Len(oSongData.Custom2) > 0 And Len("$&") > 0, ", ", "") & oSongData.Custom2 & IIf(Len(oSongData.Custom3) > 0 And Len("$&" & oSongData.Custom2) > 0, ", ", "") & oSongData.Custom3
Code: Select all
"$&, " & oSongData.Mood & ", " & oSongData.Tempo & ", " & oSongData.Custom2 & ", " & oSongData.Custom3
● 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
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
All at once: very cool! Thanks so much for your help; for someone like me who is vbscript illiterate, this is VERY helpful!
Version: MediaMonkey 3.1.0.1236
Syncs iPod Touch 2nd Gen (firmware 2.2) and SD cards via card reader
(Touch also syncs with iTunes on a Mac, OS X 10.5, set manage podcasts, apps, photos, contacts & calendar, but NOT music)
Syncs iPod Touch 2nd Gen (firmware 2.2) and SD cards via card reader
(Touch also syncs with iTunes on a Mac, OS X 10.5, set manage podcasts, apps, photos, contacts & calendar, but NOT music)
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Anyone know how I could put all my featured artists in paranthesis. For example:
Find what - ft. Easy E
Replace with - (ft. Easy E)
Find what - ft. Easy E
Replace with - (ft. Easy E)
-
- Posts: 294
- Joined: Sun Sep 07, 2008 10:46 am
- Location: Dominican Republic
- Contact:
RegSub Help
Code: Select all
RegSub(RegSub(RegSub(RegSub(RegSub(oSongData.Path,"\bI\b","1"),"\bII\b","2"),"\bIII\b","3"),"\bIV\b","4"),"\bV\b","5")
I may be using more substitutions
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Find what:mk1065 wrote:Anyone know how I could put all my featured artists in paranthesis. For example:
Find what - ft. Easy E
Replace with - (ft. Easy E)
Code: Select all
\b(?:ft\.?|feat\.?|featuring|vs\.?|versus|pres\.?|presents)\s.*[^)]$
Regular expression 1: checked
Replace with:
Code: Select all
($&)
● 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
Re: RegSub Help
Well, you could not simplify it too much. You could try with the MapArray function as it is in the "Fix common words (I'm, I'll, don't, won't, ain't, isn't, can't)" preset. For your example:GIL wrote:Is there a more efficient way to do this?Code: Select all
RegSub(RegSub(RegSub(RegSub(RegSub(oSongData.Path,"\bI\b","1"),"\bII\b","2"),"\bIII\b","3"),"\bIV\b","4"),"\bV\b","5")
I may be using more substitutions
Find what:
Code: Select all
\b(?:(I)|(II)|(III)|(IV)|(V))\b
Code: Select all
MapArray(Array("$1", "1", "$2", "2", "$3", "3", "$4", "4", "$5", "5"))
Code: Select all
If IsNumeric(sDst) Then
Code: Select all
If VarType(sDst) = vbInteger Then
Code: Select all
MapArrayEx("$&", Array("\bI\b", "1", "\bII\b", "2", "\bIII\b", "3", "\bIV\b", "4", "\bV\b", "5"))
● 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
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Suggestion for Grouping of Presets
This is really a great tool with lots of capability and lost of presets. Such, some sort of grouping for
presets comes to mind, as already discussed in this topic.
My suggestion is to add a text-field that functions as filter for the presets display in the listbox.
When this field is not-blank, then only Presets starting with the entered text are displayed.
The presets that are delivered with installation could begin with a special letter, e.g. "+" or "!"
This is really a great tool with lots of capability and lost of presets. Such, some sort of grouping for
presets comes to mind, as already discussed in this topic.
My suggestion is to add a text-field that functions as filter for the presets display in the listbox.
When this field is not-blank, then only Presets starting with the entered text are displayed.
The presets that are delivered with installation could begin with a special letter, e.g. "+" or "!"
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
As an organizational maniac I agree with this suggestion.Big Isch wrote:Suggestion for Grouping of Presets
This is really a great tool with lots of capability and lost of presets. Such, some sort of grouping for
presets comes to mind, as already discussed in this topic.
My suggestion is to add a text-field that functions as filter for the presets display in the listbox.
When this field is not-blank, then only Presets starting with the entered text are displayed.
The presets that are delivered with installation could begin with a special letter, e.g. "+" or "!"
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
- Posts: 312
- Joined: Mon Apr 03, 2006 9:11 am
- Location: Denver, CO
Re: RegExp Find & Replace 3.5 w/ 101 presets (2009-06-18)[MM2+3]
Question here, and again I apologize for my lack of knowledge with regexp. I'd like to capitalize all the text (from: happy to: Happy) in all the following fields:
Tempo, Mood, Occasion, Quality
I use these a lot and sometimes forget to capitalize. I have presets set up for each one, but if I could run all four at once, that'd be excellent.
Each has the following setting:
Find What: ([\w\xDF-\xF6\xF8-\xFF\u0100-\u024F\u0400-\u04FF])([\w'\xDF-\xF6\xF8-\xFF\u0100-\u024F\u0400-\u04FF]*)
Replace with: UCase("$1") & LCase("$2")
Thanks for your help.
Tempo, Mood, Occasion, Quality
I use these a lot and sometimes forget to capitalize. I have presets set up for each one, but if I could run all four at once, that'd be excellent.
Each has the following setting:
Find What: ([\w\xDF-\xF6\xF8-\xFF\u0100-\u024F\u0400-\u04FF])([\w'\xDF-\xF6\xF8-\xFF\u0100-\u024F\u0400-\u04FF]*)
Replace with: UCase("$1") & LCase("$2")
Thanks for your help.
MM Gold since 2006
-
- Posts: 294
- Joined: Sun Sep 07, 2008 10:46 am
- Location: Dominican Republic
- Contact:
Re: RegSub Help
Thanks, That's what I need to modify from another fields than the one with the numbersThe next version of the script would have somewhat simpler MapArrayEx function with which you could write the Replace with string directly, without specifying strings for replacement in the Find what field as it is in previous case. Here is its future use:Code: Select all
MapArrayEx("$&", Array("\bI\b", "1", "\bII\b", "2", "\bIII\b", "3", "\bIV\b", "4", "\bV\b", "5"))
YeahIf you are interested for such syntax, I could publish the updated script with that function.
Do you ever wish you could get the version 35.9 of this script from the year 2025?
That's no problem, I'll be using this to detect Disc # from the path, so it would need to say "I" after the words (CD|Disc|Disk|Disco), you know.By the way, you will have a problem with English word "I" with those replacements.
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid