RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post a reply

Visual Confirmation

To prevent automated access and spam, you are required to confirm that you are human. Please place a check mark next to all images of monkeys or apes. If you cannot see any images, please contact the Board Administrator.

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by ZvezdanD » Thu May 23, 2013 9:54 am

FEB wrote:I have a request. Is it possible to populate one of the Custom fields with the AlbumID number?

Yes. You could use oSongData.Album.ID with the VBScript expression option.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by FEB » Thu May 23, 2013 8:54 am

I have a request. Is it possible to populate one of the Custom fields with the AlbumID number?

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by downundermike » Mon Apr 22, 2013 3:58 pm

Love this add on. Not good enough to figure out how to write code or manipulate the pre existing so any help would be appreciated.

I have taken one of the custom fields and renamed it featuring, so all additional artists on the track are listed in this field.

How do I then do a find and replace to move feat. from the end of song name, or artist name to Custom 1 " featuring "

Need Help with Auto Organize RegEx

Post by jpottsx1 » Mon Apr 15, 2013 3:48 pm

I love the regex utility, but I'm not really a programmer type and I'm struggling to understand how to change the expression.

The script "Move files to <Genre>\<Artist>\<Album>\<Track#> - <Title>.ext" is a good starting point, but I have to organize my files a bit differently. I am forced to use two locations/drives, and my files then need to be sub-sorted by genre, then organized by Alphabet. For example I need to move files into this structure:

Example for mp3/acc/m4a = Z:\mp3\Alternative\A\Alabama 3\Exile On Coldharbour Lane\01 - Alabama 3 - Converted.mp3
OR
Example for flac = Y:\Flac\Alternative\C\Concrete Blonde\Bloodletting\01 - Concrete Blonde - Bloodletting (The Vampire Song).flac

The VBscript as it is presented within the utility;
Code: Select all
IIf(Len(oSongData.Genre) > 0 And Len(oSongData.ArtistName) > 0 And Len(oSongData.AlbumName) > 0 And Len(oSongData.TrackOrderStr) > 0 And Len(oSongData.Title) > 0, "$1\" & SDB.Tools.FileSystem.CorrectFilename(oSongData.Genre & "\" & oSongData.ArtistName & "\" & oSongData.AlbumName & "\" & Right("00" & oSongData.TrackOrderStr, 2) & " - " & oSongData.Title) & ".$4", oSongData.Path)

Does not seem to work. It inserts dashes "-" instead of backslashes "\" as expected. The actual output of the script is "Y:\Jazz-Coleman Hawkins-Coleman Hawkins! Roy Eldridge! Johnny Hodges! Alive! At the Village Gate-02 - Perdido.flac" I've read as much as I can digest and still cannot figure out why it does this.

Could someone point/help me in the right direction . . .

Thanks

Jeff

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by rovingcowboy » Fri Apr 05, 2013 7:50 am

yarguy wrote:Regretably I only know a little about using regular expressions, but have been learning. My current issue is how to deal with variable, but fixed length content. Here's the specific example. I have a long list of Schubert Lieder (prolific hardly describes his output) where the titles are currently of the form:

D.108 Der Abend ("Purpur malt die Tannenhügel")

(The D is the Deutsch number after the man who catalogued all Schubert's Compositions.)

In one set of lieder the D number is always 5 characters long with a period after D, as above. I want to move this to the end so that the title would read:

Der Abend ("Purpur malt die Tannenhügel"), D 108

In some others there is no period after the D and so the number is 4 characters long:

D548 Orest auf Tauris (Mayrhofer)

which should be:

Orest auf Tauris (Mayrhofer), D 548

I assume the solution is similar in both cases. Is anyone willing to offer a quick lesson in this?



Sorry i dont know your answer.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by rovingcowboy » Fri Apr 05, 2013 7:34 am

Kevinowpb wrote:no response/ideas on this one?-->>


Kevinowpb wrote:Something in my Maintain Database locked up,... and now I have a bunch of GENRES with ++@$$ O+++++&&&//// ..... What I'll refer as ... "foreign characters.."

How can I do a "Find any file where GENRE contains "foreign characters.. ie non-alpha ...." and clear the entire GENRE field out?


Only thing i can think of is to go through your collection one genere at a time, and add then number 1 to the end of every genere in the songs properties panel, you can do that in groups of songs by adding genere column in the library view screen and sorting the list by genere, and double click the genere text box in the column for one of the songs to open the edit box add the number to the end of the genere name by completely retyping the name and click ok if asked that. Then select that genere you just changed copy it and select all the songs in that genere you are changing by clicking on the genere tag in that same column and holding the shift key while you scroll to see all the songs of that same genere and then right click in the last songs genere column and pasteing the new genere name & number in them. Do that for every genere in your library then you will have all new ones listed in the drop down menu, you then can open the properties of one song and that should let you use the genere drop down menu to delete all the grayed out ones,

Then go back and remove the number from them and repeat the deleteing from the dropdown menu to get rid of the generes with the numbers which would be all grayed out, it will give you an list of new generes and should clear out the ones with the bad characters,


Only other way is find a way to edit the mm database from within the database.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by yarguy » Fri Apr 05, 2013 7:05 am

Regretably I only know a little about using regular expressions, but have been learning. My current issue is how to deal with variable, but fixed length content. Here's the specific example. I have a long list of Schubert Lieder (prolific hardly describes his output) where the titles are currently of the form:

D.108 Der Abend ("Purpur malt die Tannenhügel")

(The D is the Deutsch number after the man who catalogued all Schubert's Compositions.)

In one set of lieder the D number is always 5 characters long with a period after D, as above. I want to move this to the end so that the title would read:

Der Abend ("Purpur malt die Tannenhügel"), D 108

In some others there is no period after the D and so the number is 4 characters long:

D548 Orest auf Tauris (Mayrhofer)

which should be:

Orest auf Tauris (Mayrhofer), D 548

I assume the solution is similar in both cases. Is anyone willing to offer a quick lesson in this?

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by Kevinowpb » Sat Mar 23, 2013 1:06 pm

no response/ideas on this one?-->>


Kevinowpb wrote:Something in my Maintain Database locked up,... and now I have a bunch of GENRES with ++@$$ O+++++&&&//// ..... What I'll refer as ... "foreign characters.."

How can I do a "Find any file where GENRE contains "foreign characters.. ie non-alpha ...." and clear the entire GENRE field out?

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by seed_or_die » Sun Mar 17, 2013 12:40 am

selecct the "Full" button. i dont know what it does, but seems to get the desired outcome.

Image

Re: Need some help with RegExp Find and Replace

Post by nzdreamer55 » Sat Mar 16, 2013 8:18 pm

Thanks for the idea, but it seems that it just add what I put in the replace with on to what is already in the custom 1 field

I typed in "Unk" because I wanted this to be replaced into where it says 2000s. What am I doing wrong?

Image

Re: Need some help with RegExp Find and Replace

Post by seed_or_die » Sat Mar 16, 2013 6:39 pm

you see there it says "replace with" under the [....'s] text you have highlighted. add what you want in that.

Need some help with RegExp Find and Replace

Post by nzdreamer55 » Fri Mar 15, 2013 11:13 pm

Hello everyone,

Got a little find and replace problem. I am using the custom 1 field to store Discog.com ID numbers, but for some reason a lot of my music got the decade place into the custom 1 field for songs that I had not found the Discog.com ID number.

So now the custom 1 field is filled with 1970's, 1980's, 1990's, etc for some of my songs. I want to find any of these and replace it with "Unk".

I don't really know how to use the RegExp and have attached a picture of where I am stuck. Could someone help me correct this so I can replace these values?

Thanks
-S

Image

Add a Script in MM helpful for many users

Post by amar3213 » Sun Mar 10, 2013 4:18 am

Currently I am using a add-on named "RegExp Find & Replace". It has around 256 script in which we generally used only one i.e. the first script
"Replace specified string with another one in <Into Field>...".

It would be better if you add this one script into Tools > Scripts menu because most of the time it is very useful & we generally used it. The add-ons itself content 256 script but it would be better if you add this single script from that huge 256 script, so that, it is available to MM users by default with installation in Tools > Scripts menu.

However the add-ons content more useful script but the first one is mostly used so consider it to include in your next version of MM.

There are the list of some other useful script from this add-ons:

Add (<From Field>) to the end of <Into Field> (only if exists)...
Add specified string to the end of <Into Field> (only if not empty)...
Add leading zero to single-digit Track number
Remove leading and trailing spaces from <Into Field>...

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by listaykx » Wed Mar 06, 2013 9:25 am

zephyr wrote:Hi. New to regular expressions. I have lots of tracks with bad artist info. I went to update with info from the title field, where it contains the title and artist.

Example

Title
Editors / All Sparks
Kings of Leon / Molly's Chambers

Can I get the artist from the title? HOW? Many thanks

preset 112 from %programfiles(x86)%\mediamonkey\scripts\auto\regexpreplace.ini: "Assign the begin of <From Field> before specified string to <Into Field> (only if exists)...", run it from the toolbar so you get the options dialog box

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by zephyr » Wed Mar 06, 2013 7:00 am

Hi. New to regular expressions. I have lots of tracks with bad artist info. I went to update with info from the title field, where it contains the title and artist.

Example

Title
Editors / All Sparks
Kings of Leon / Molly's Chambers

Can I get the artist from the title? HOW? Many thanks

Top