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

Diabolic-Destiny
Posts: 223
Joined: Sun Apr 29, 2007 9:45 pm

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

Post by Diabolic-Destiny »

damn stupid me.
Image
Image
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

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

Post by CarlitoGil »

Why when changing many PATH fields, in other words,
Why when renaming filenames the status bar says X track(s) to be tagged?

Is it really retagging or just uses the same language as fields that are in the tag?
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
ZvezdanD
Posts: 3257
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 »

GIL wrote:Why when renaming filenames the status bar says X track(s) to be tagged?

Is it really retagging or just uses the same language as fields that are in the tag?
This is a MediaMonkey information which is automatically displayed. I am not sure, but I suppose MM shows it whenever some tags is written to file.
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
forschi

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

Post by forschi »

Hello. I'm new to all this, really like the possibilities in this plugin/script, wondering how a code would look if i wanted:
- to search trough comments and find any numbers behind " - ", remove the spaces and copy the numbers to another tag while leaving everything in front of " - " as it is (ex. Comment is: "9A/8B - 143" -> Comment: "9A/8B" BPM: "143")
- to search comment for any single digit number followed by a letter and replace it with a 2-digit number (ex. 9A/8B -> 09A/08B)

Or maybe it would be possible to use a code that does both of these in one operation?
ZvezdanD
Posts: 3257
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 »

forschi wrote:copy the numbers to another tag
Find what:

Code: Select all

^.*
Into: BPM
RegExp1: checked
Replace with:

Code: Select all

RegExpEx(oSongData.Comment, "^.*?-\s?(\d+)", 0, 0)
VBScript: checked
forschi wrote:while leaving everything in front of " - " as it is ... and replace it with a 2-digit number
Find what:

Code: Select all

^(\d\d?)(\w/)(\d\d?)(\w)\s?-.*
Into: Comment
RegExp1: checked
Replace with:

Code: Select all

Right("0$1", 2) & "$2" & Right("0$3", 2) & "$4"
VBScript: checked
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
MCSmarties
Posts: 251
Joined: Tue Dec 06, 2005 8:01 pm

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

Post by MCSmarties »

I am still not very comfortable with Regular Expressions, but I wanted to share some helpful resources to learn them:

Sams Teach Yourself Regular Expressions in 10 Minutes (awesome book!)
Regular expressions tutorial

Here is a library of existing regular expressions.

Two useful "testing tools" here and here.

And finally here is a software that will automatically generate regular expressions based on text you specify.
Fully functional 30-day trial demo is free, the software costs $40.

Hope these will prove useful! :D

PS: Another suggestion, how about a webpage (or even just a dedicated thread in this forum) for users to share their mediamonkey-specific regular expressions, in addition to the bundled presets that ZvezdanD kindly includes with his script?
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Change Folder Path Case

Post by CarlitoGil »

When changing only the case for folders they stay the same,
Consider adding something like this to future updates

After

Code: Select all

 Execute ("oSongData." & sSongData & " = " & sAfter)
Add

Code: Select all

If sSongData = "Path" Then 
	Set oFileSys = CreateObject("Scripting.FileSystemObject")
	sFolder = Left(sAfter, InStrRev(sAfter, "\") - 1)
	If Not sFolder = oFileSys.GetFolder(sFolder).Path Then
		sFolder = Split(sFolder,"\")
		Dim A
		For A = Ubound(sFolder) To 1 Step -1
			If Not sFolder(A) = oFileSys.GetFolder(Join(sFolder,"\")).Name Then Call oFileSys.MoveFolder(Join(sFolder,"\"),Join(sFolder,"\"))
			On Error Resume Next
			Err.Clear
			ReDim Preserve sFolder(A - 1)
		Next
		'oSongData.path = oFileSys.GetFile(oSongData.path)
	End If
End If
By the way
When is 3.7 comming?
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
only one haze
Posts: 3
Joined: Mon Oct 19, 2009 10:32 pm

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

Post by only one haze »

do i have to have the gold version to use this? i tried to install and it says product install error... any help would be greatly appreciated...LOVE MM by the way
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

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

Post by nohitter151 »

only one haze wrote:do i have to have the gold version to use this? i tried to install and it says product install error... any help would be greatly appreciated...LOVE MM by the way
You need to start up MM as admin:
1. Close MM
2. Right click MM icon -> Run as administrator
3. Install plugin
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
only one haze
Posts: 3
Joined: Mon Oct 19, 2009 10:32 pm

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

Post by only one haze »

ahhh..Didnt think to try that. Thank you good sir!
only one haze
Posts: 3
Joined: Mon Oct 19, 2009 10:32 pm

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

Post by only one haze »

ok..One more question. I installed the 101 presets and have been using the copy feat. artists from Title to Artist and then remove feat. Artist from Title. Is there a way to make it do both back to back without having to do them both manually? Or make another preset to Move the feat. Artist so that it would be all in one step? Thanks again. Love this script and MM!
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

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

Post by declan »

The script only writes to one field at a time.

You could give the two presets icons & create toolbar buttons. So you can run them quickly one after the other.
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Previewing or Replacing?

Post by CarlitoGil »

What is the best way for a VBScript expression to detect if the script is generating a preview or is replacing the data?
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
RabanePaco
Posts: 87
Joined: Fri Jul 27, 2007 7:58 am
Location: Leiden, The Netherlands

M reo complex "Swap the first and the last name" script soug

Post by RabanePaco »

First, thanks a lot for the RegExp Find & Replace script.

I used to be an avid user of Mp3Tag, but, sorry for them, I completely switched over. I'm an old (Unix ed(!)/vi/etc) RegExp. hacker, but still have to learn VB scripting.

What I'm looking for is a preset that swaps the first and last name of multiple artists. Of course I could run the preset multiple times.

Original could be: Ewa Podles (c.alto), Raphaëlle Farman (sopr.), Marie-Noëlle de Callataÿ (sopr.), Collegium Instrumentale Brugensis, Capella Brugensis; Patrick Peire (dir.)

Replacemetn should be: Podles, Ewa (c.alto); Farman, Raphaëlle (sopr.); Callataÿ, Marie-Noëlle de (sopr.); Collegium Instrumentale Brugensis; Capella Brugensis; Peire, Patrick (dir.)

All the first and last names are swa[[ed. ,'s switched to ;'s. Notice Collegium Instrumentale Brugensis gets skipped.

I know it is (very) complex. Possibly it needs more presets. Any suggestions?

Thanks.
        -- 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)
Fang

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

Post by Fang »

Is there a way to limit the length of the “file name” to a certain number of chars, say 29 including the .mp3 extension? The reason for this request is that on the GM autos with mp3 capable players, NAV and 6 disk players, there is a limit of 32 chars.
If one goes over this limit when burning a mp3 CD the player gets confused and doesn’t play correctly. The system uses the old ISO and ver 1 mp3 ID tag info format to show title ect on the display.
Post Reply