Page 58 of 101

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

Posted: Sun Feb 24, 2013 10:02 am
by Kevinowpb
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

Posted: Tue Feb 26, 2013 11:18 am
by linn
@ ZvezdanD
This utility is a wonderful tool,but it would be so much userfriendly if it would be simpler to find a preset.
The presets have numbers ,if these numbers would be shown in the dialog , the presets would be easier to find.
I copied the list to Onenote, i can search the page with a phrase.
but how do i find "Replace acute and grave accents with apostrophes in <Into Field>..." , now if i could use the number........

Image

I am not sure why the numbers ,they are not used ( except that they are shown) as far as i can see.
Image

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

Posted: Tue Feb 26, 2013 1:55 pm
by ZvezdanD
linn wrote:it would be so much userfriendly if it would be simpler to find a preset.
Yes, I am aware that this script is not very user-friendly when it comes to finding presets. I am already working on a possibility to make grouping of presets easier, but it would help only to find presets in the menu, but not in the F&R dialog box. I am not sure how could I modify that dialog box to make it simpler. I don't think that navigation using preset's number would be any more user-friendly than it is now.

I could give you just few suggestions, some of them are trivial and you may already know about that:
- remove all presets that you don't use, the shorter list is easier to navigate and you could always import some missing preset if you need it from the RegExpReplace.ini file in the Script folder;

- move all favorite presets to the begin of the list;

- group presets by similarity, e.g. put all "track number" presets one after another;

- if you already know the name of the preset you are looking for, maybe it would be easier for you to find it if you sort the list alphabetically: open the RegExp Presets Export/Import dialog box and click on the table header to do that, but keep in mind that this operation is irreversible, so it is recommended that you previously export all your presets to some .ini file;

- navigate through the Preset dropdown list using the Up/Down keys on the keyboard, maybe it would be faster for you than using the mouse and scroll bar;

- if you just want to edit some existing preset, finding of it would be much easier in the table of the RegExp Presets Export/Import dialog box than it is in the dropdown list in the RegExp Find & Replace dialog box - just click on its number in the table and you would get the similar dialog box as the RegExp Find & Replace for manipulation of presets.

By the way, gggirlgeek already made one custom RegExpReplace.ini file with modified names of presets with added serial numbers in the front which could help navigation by numbers (http://www.mediamonkey.com/forum/viewto ... 19#p333519). Unfortunately, the link to that file is not working anymore, so you could try to send her a PM asking for it.

Of course, you could make such modifications all by yourself. Here is the short description how to do that much faster than editing the preset names in the F&R dialog box one by one. Firstly, you should install some text editor with good RegEx engine. This example is with EditPad freeware version which has such possibility:
- open RegExpReplace.ini file;
- choose Search|Show Search Panel;
- turn on Regular Expression;
- type "Preset(\d+)=Name: "" in the Search field (without double quotes on the ends);
- type "Preset$1=Name: "$1) " in the Replace field (again, without double quotes on the ends);
- choose Search|Replace All (Ctrl+Alt+F3);
- save file.

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

Posted: Tue Feb 26, 2013 4:22 pm
by linn
ZvezdanD wrote:
linn wrote:
it would be so much userfriendly if it would be simpler to find a preset.
Yes, I am aware that this script is not very user-friendly when it comes to finding presets. I am already working on a possibility to make grouping of presets easier, but it would help only to find presets in the menu, but not in the F&R dialog box. I am not sure how could I modify that dialog box to make it simpler. I don't think that navigation using preset's number would be any more user-friendly than it is now.
For me ,numbers would be a help; i'll explain: i have all presets copied to Onenote, i do a page search for "moon"( i know this word is in the preset i seek), Onenote finds the word , i open the F&R dialog box, and go to number 4.

Image
I could give you just few suggestions, some of them are trivial and you may already know about that:
No i didn't know most of these suggestions, thank you for providing these ," remove all presets that you don't use," is a good one! should have thought of this myself :oops:
And "sort the list alphabetically" should help too.

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

Posted: Wed Mar 06, 2013 7:00 am
by zephyr
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

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

Posted: Wed Mar 06, 2013 9:25 am
by listaykx
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

Add a Script in MM helpful for many users

Posted: Sun Mar 10, 2013 4:18 am
by amar3213
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>...

Need some help with RegExp Find and Replace

Posted: Fri Mar 15, 2013 11:13 pm
by nzdreamer55
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

Re: Need some help with RegExp Find and Replace

Posted: Sat Mar 16, 2013 6:39 pm
by seed_or_die
you see there it says "replace with" under the [....'s] text you have highlighted. add what you want in that.

Re: Need some help with RegExp Find and Replace

Posted: Sat Mar 16, 2013 8:18 pm
by nzdreamer55
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: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Posted: Sun Mar 17, 2013 12:40 am
by seed_or_die
selecct the "Full" button. i dont know what it does, but seems to get the desired outcome.

Image

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

Posted: Sat Mar 23, 2013 1:06 pm
by Kevinowpb
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

Posted: Fri Apr 05, 2013 7:05 am
by yarguy
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

Posted: Fri Apr 05, 2013 7:34 am
by rovingcowboy
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

Posted: Fri Apr 05, 2013 7:50 am
by rovingcowboy
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.