Page 57 of 109
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Thu Sep 06, 2012 8:50 am
by ZvezdanD
MMuser2011 wrote:I have a speed issue:
If I search for all albums in my (huge) Entire Library with the wrong/double spelled "(disc x) (disc x)" in the album name - with x as a number from 1-999 - I do a search with this regexp into the field ALBUM
Code: Select all
(\(disc ([1-9][0-9]{0,2})\)) (\(disc ([1-9][0-9]{0,2})\))
and replace it with $1.
Technically, this works perfect.
Because I'm cautious, I would like to see all the matching results of the RegExp before I press "replace all". If I choose "Select matched", it takes over 12 Minutes until I get the result. The other option "Keep matched" is just a few seconds faster.
So how can I do a RegExp search in my entire library and only get back the matching result visible BEFORE I apply any changes?
Just to compare: If I use the builtin CTRL-F search and look for the fixed string "(disc 1) (disc 1)" it takes 5 seconds to obtain my desired result. What am I doing wrong? How can I speed this up?
Well, the built-in Search option is based on SQL while this script is based on VBScript. SQL is the fastest for the database manipulations, but VBScript is more flexible. For example, with the built-in option you cannot search for an unspecified string like disc x where x could be any number. By the way, if you want to search for some string that is at the end of some field, you could add the $ at the end of the regular expression. I am not sure, but I suppose that the execution would be faster in that case since programmatically it is always faster if you search for some string from the begin or the end rather then if it is in any another place in the middle.
If you want to get displayed only tracks that have Album containing "(disc x) (disc x)" maybe you could try Magic Nodes add-on with the next Filter:
Code: Select all
<Album> Glob '*(disc *) (disc *)*'
I didn't try it, but I suppose it should work. After that you could apply RegExp on the filtered tracks.
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Sat Sep 29, 2012 7:00 pm
by steviegt
Can anyone please help with making a correction to a result? I know for some it's a bother to answer this type of question so any help is appreciated. I know zip about creating/correcting this sort of thing. Thanks in advance.
I want to add a new subfolder after "Music" to show the artist name and remove the artist from the track info & keep everything else the same.
The current "Replace With" is:
"C:\Users\Steve\Music\" & SDB.Tools.FileSystem.CorrectFilename(oSongData.ArtistName & " - " & oSongData.AlbumName & IIf(Len(oSongData.DiscNumberStr) > 0, " - Disc " & oSongData.DiscNumberStr, "") & " - " & Right("0" & oSongData.TrackOrderStr, 2) & " - " & oSongData.Title) & ".$4"
This is the result:
C:\Users\Steve\Music\Dream Theater - A Dramatic Turn Of Events - 01 - On The Backs Of Angels.flac
The desired result is:
C:\Users\Steve\Music\Dream Theater\A Dramatic Turn Of Events - 01 - On The Backs Of Angels.flac
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Sun Sep 30, 2012 5:24 am
by alfawykx
how about using mm built-in feature auto-organize files to get the desired folder/file-name structure and use the properties window to remove the artist from tags?
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Sun Sep 30, 2012 7:48 am
by BKKKPewsey
Use auto-organise files with
Code: Select all
C:\Users\Steve\Music\<Artist>\<Album> - <Track#:2> - <Title>
No need to use RegExp to do this.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Sun Sep 30, 2012 11:24 am
by steviegt
Thanks for responding. I use Auto-Organize. I just use this script for other things and I have a routine when tagging or changing files. I'd still be gratefull if you or someone could help me out.
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Tue Oct 09, 2012 11:49 pm
by Nanya
The preset for lowercasing extensions doesn't work with any extension containing a lowercase letter. E.g., .Ogg, .Mp3, .wMa etc.
I've replaced this with (.+)\.([\d\w]+) in the "Find what" field, and "$1." & LCase("$2") in the "Replace with" field. Seems to work ok.
Soundtracks
Posted: Sun Oct 14, 2012 9:24 pm
by ObsessiveTagger
Could this add on automatically change the genre field from whatever the existing genre is to "Soundtrack" for songs from soundtracks? Also could it automatically change any form of punctuation to a specified punctuation. For example, if the album title in a tag read "The Lost Boys: Original Motion Picture Soundtrack" I'd like to be able to remove the colon and put "Original Motion Picture Soundtrack" in parentheses. This would work for brackets, dashes, etc. and would be able to change them to the user's desired punctuation. Finally I'd like to be able to analyze a tag and automatically delete certain words in any of its fields. If I had an mp3 whose album title read "Batman Forever [Music from and inspired by the motion picture]" I'd like to remove "and inspired by". My end result for all of this would be to produce a tag whose genre was "Soundtrack", whose album artist was "Various Artists", and whose album title was "Batman Forever (Music from the Motion Picture)" without having to lay a finger on my keyboard or Auto-Tag from the web. If anyone knows if RegExp Find & Replace 4.3 could accomplish any of the above, please reply! Thank you!
ISO8601 Dates In Podcast Titles
Posted: Fri Nov 09, 2012 12:31 pm
by macmcd
Sorry if I have missed this already in this thread but couldn't find it with a search. I am trying to added the date to the start of podcast titles to differentiate them. Preset 102 - Add <From Field> followed by " - " to the begin of <Into Field> (only if exists)... almost does the job but the dates are not in ISO8601 format i.e. the title becomes:
2012-11-1 - Podcast Title
whereas I need it to be
2012-11-01 - Podcast Title
in order that podcasts sort correctly.
My programming experience is very limited (Amos anybody?), could some kind person give me an expression that would do this:
If exists date, then add to title in ISO8601 format followed by " - "
This would save me considerable time otherwise blundering about not knowing what I am doing.
Many thanks,
Mac.
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Mon Nov 26, 2012 11:56 am
by Kevinowpb
How can I remove any QUOTES from <into field> (ie Title)
I see the Remove and Replace option, and the remove altogether option..... however, in both, it doesn't recognize the """ (quote in the middle of quotes) to find a quote..?
I don't have many.. I guess I could do it manually... but now, I just want to know if its possible..
Thanks!
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Sat Dec 01, 2012 12:29 am
by carkey151
In one of the "Custom Fields" I have the chart listing for week debut, week peaked, chart position and weeks charted, for each song like this:
1/13/69--2/17/69--*03--9
Is there a way I can move the Chart Position to the front so it would look like this:
*03--1/13/69--2/17/69--9
I'm still using MM3 if that makes any difference.
Any help would be greatly appreciated!
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Sat Jan 12, 2013 1:11 pm
by TEN
Dude - I can't tell you how cool this thing is! I'm trying to import a vast collection of jazz and classical CDs into my computer and have been killing myself with the messed up track info that comes from freedb for multiple disk releases. This makes it really easy to bring some order to the chaos!

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Sun Jan 27, 2013 7:11 pm
by Hdhntr23
Hey all!!
First let me say Im all for searching a forum for an answer before posting a question.
So... apologies in advance but with a 57 page thread, its almost impossible to find a specific answer.
Im looking for 2 things for this add-on to do for me and Im wondering if you guys can help me get it to do so?
1) I want it to add a zero at the beginning of my track #'s and I cant seem to figure out how to get it to do it (1-9) etc.
2) I want all new words to be capitlized
I spose if I were greedy and putting a wish list, Id like to figure out how to switch [ * ] or { * } to ( * ) or ft. to Feat etc?
I appreciate any help in advance...
THANKS!
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Mon Jan 28, 2013 9:58 am
by BKKKPewsey
Hdhntr23 wrote:First let me say Im all for searching a forum for an answer before posting a question.
Searching your RegExp Find & Replace add-on may have been useful.
Hdhntr23 wrote:1) I want it to add a zero at the beginning of my track #'s and I cant seem to figure out how to get it to do it (1-9) etc
Preset 81"Add leading zero to single-digit Track number"
Hdhntr23 wrote:2) I want all new words to be capitlized
Preset 236 "Capitalize <Into Field> (ASCII, Latin-1, Latin-2 & Cyrillic)..."
Note my preset no's may be slightly different on your copy
Also MM standard script Case checker will capitalize (strangely enough

)

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Mon Jan 28, 2013 5:31 pm
by Hdhntr23
BKKKPewsey wrote:Hdhntr23 wrote:First let me say Im all for searching a forum for an answer before posting a question.
Searching your RegExp Find & Replace add-on may have been useful.
Hdhntr23 wrote:1) I want it to add a zero at the beginning of my track #'s and I cant seem to figure out how to get it to do it (1-9) etc
Preset 81"Add leading zero to single-digit Track number"
Hdhntr23 wrote:2) I want all new words to be capitlized
Preset 236 "Capitalize <Into Field> (ASCII, Latin-1, Latin-2 & Cyrillic)..."
Note my preset no's may be slightly different on your copy
Also MM standard script Case checker will capitalize (strangely enough

)

Great thanks!
Now if I could just figure out how to load either preset?
Im going to regret saying this but Ive been toying around with the add-on for an hour and I cant find how to load in the app?
Thanks in advance!
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M
Posted: Mon Jan 28, 2013 8:19 pm
by Hdhntr23
Hdhntr23 wrote:BKKKPewsey wrote:Hdhntr23 wrote:First let me say Im all for searching a forum for an answer before posting a question.
Searching your RegExp Find & Replace add-on may have been useful.
Hdhntr23 wrote:1) I want it to add a zero at the beginning of my track #'s and I cant seem to figure out how to get it to do it (1-9) etc
Preset 81"Add leading zero to single-digit Track number"
Hdhntr23 wrote:2) I want all new words to be capitlized
Preset 236 "Capitalize <Into Field> (ASCII, Latin-1, Latin-2 & Cyrillic)..."
Note my preset no's may be slightly different on your copy
Also MM standard script Case checker will capitalize (strangely enough

)

Great thanks!
Now if I could just figure out how to load either preset?
Im going to regret saying this but Ive been toying around with the add-on for an hour and I cant find how to load in the app?
Thanks in advance!
OK,
Turns out it didnt install properly and I was looking in the Tools section vs. the button in the tool bar.
I see all the presets, I just cant look at them by number... (How do I do that?)
Im getting there!
This looks like a kick ass script! Thanks a ton for writing it.