Page 27 of 108

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

Posted: Sat Aug 29, 2009 1:31 am
by Diabolic-Destiny
damn stupid me.

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

Posted: Sat Sep 05, 2009 2:23 pm
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?

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

Posted: Sun Sep 06, 2009 6:38 pm
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.

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

Posted: Fri Sep 11, 2009 6:00 pm
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?

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

Posted: Sat Sep 12, 2009 5:28 pm
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

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

Posted: Wed Sep 16, 2009 11:04 am
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?

Change Folder Path Case

Posted: Tue Oct 13, 2009 3:09 pm
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?

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

Posted: Mon Oct 19, 2009 10:38 pm
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

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

Posted: Mon Oct 19, 2009 11:22 pm
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

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

Posted: Tue Oct 20, 2009 7:48 am
by only one haze
ahhh..Didnt think to try that. Thank you good sir!

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

Posted: Wed Oct 21, 2009 8:59 am
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!

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

Posted: Fri Oct 23, 2009 6:45 am
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.

Previewing or Replacing?

Posted: Tue Oct 27, 2009 9:09 pm
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?

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

Posted: Wed Oct 28, 2009 12:33 am
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.

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

Posted: Sat Nov 21, 2009 5:30 pm
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.