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 » Sun Jan 25, 2015 2:12 pm

Preset: Remove <From Field> from the begin of <Into Field>
Description: If Album = The Wall, Artist = The Wall Pink Floyd -> Pink Floyd
Find what: ^.*
Into: whatever field (e.g. Artist)
Regular expression 1: checked
Replace with: IIf(<From Field> = Left("$&", Len(<From Field>)), LTrim(Mid("$&", Len(<From Field>) + 1)), "$&")
From: whatever field (e.g. Album)
VBScript: checked

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

Post by ZvezdanD » Sun Jan 25, 2015 2:09 pm

Preset: Keep only specified number of words from the end of <Into Field>...
Description: If specified value = 2, Dark Side of the Moon Pink Floyd -> Pink Floyd
Find what: .*((?:\s+\S+){<Number Caption = "Number of words" Value = "2" MaxValue="100">}$)
Into: whatever field
Regular expression 1: checked
Replace with: LTrim("$1")
VBScript: checked

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

Post by MMFrLife » Thu Jan 15, 2015 1:42 pm

You should be able to do that directly in MM.
Select all album tracks > right-click > properties > erase artist field > type in America.

Is that what you tried?
Similar "idea" for RegEx as above, but it shouldn't be necessary. It can be done as a native function.

As far as a script to just automatically do this every time, not sure, as that field's info would be unique for every album.
There is a way to lop off things at the end in RegEx. but how you would set it for the various unique lengths might be difficult.

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

Post by rfhmediamonkey » Wed Jan 14, 2015 9:27 pm

In my Media Monkey Library version 4.1.5 under Artist & Album Artist, I'm trying to remove the title of song from artist field.

Example: Under the Title field it shows "A Horse with No Name" which is okay. Under the Artist field it shows, "A Horse with No Name America". It should only show under the Artist field as "America".

I have used RegExp Find/Replace and Auto-Tag from Filename but still haven't found a solution. Also, cannot find a preset or filename format to get this resolved.

Can you fix this with the correct script or do you have any other suggestions?

Thank you.

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

Post by popsmike » Tue Dec 09, 2014 4:12 pm

ZvezdanD wrote:
kluv wrote:Will this Addon get updated anytime soon?

The new version is in development, but I don't know when it will be finished since that depends on donations.


Keep us posted on the update ZvezdanD we always welcome your new Scripts, they are as the Americans say "Awesome"
and some people will definitely contribute to your work!!

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

Post by ZvezdanD » Mon Dec 08, 2014 9:56 am

kluv wrote:Will this Addon get updated anytime soon?

The new version is in development, but I don't know when it will be finished since that depends on donations.

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

Post by kluv » Mon Dec 08, 2014 5:49 am

Will this Addon get updated anytime soon? Was wondering if you could add an auto function. I have about 7 presets I do on my music and if I could just push a button so that it runs thru all of them automatically that would be swell.

Thanks and thanks for developing RegExp, I use this program more than any other and it's been a life saver. Thanks again and have a Merry Christimas!!

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

Post by pintree3 » Tue Nov 25, 2014 1:24 pm

Thanks for this--really great :-)
Unfortunately for me, unless I'm wrong, the one feature I came here for does not seem to exist.
You have:
1- Uppercase first letter of each folder/filename of Path
2- Uppercase first letter of each line or sentence of Lyrics and lowercase others
3- Uppercase only first letter of each line or sentence of Lyrics, others unchanged
The 1st seem to be according to the actual file and not what you see within MM
The other 2 interest me except not for lyrics but for the actual song title (or even album name and artist)
So song title / artist / album
would be corrected from
''I Love What You Think Of That Guy Who Refused To Accept What She Said''
to
''I love what you think of that guy who refused to accept what she said''
I really, really hate these super long titles that bands think are cool for some reason.
Actually considering long titles I wouldn't mind a command line that
replaces common words such as 'your' to 'ur', 'you' to 'u', 'and' to &', 'with' to 'w'
Oh and here's another idea, if I may, What of limiting a title to a given number of characters, for ex. 22, followed by 3 dots.
So the above title would go from.
''I love what you think of that guy who refused to accept what she said''
to
''I love what you think...''

Thank you

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

Post by MMuser2011 » Tue Nov 25, 2014 2:43 am

Have a look at the 253 presets.
You will find several entries like
"Copy featuring artists or [(featuring artists)] from the end of Artist to the end of Title"
or
"Copy featuring artists from the end of Artist to the end of Title and put them within ( )"
or
"Copy ft. artists from the end of <From Field> to the end of <Into Field> and put them in ( )..."

It should be easy to adjust it to your needs.

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

Post by Hdhntr23 » Mon Nov 24, 2014 2:49 pm

Hey guys,

Im curious if anyone can tell me some tricks to get "feat. xyz" from artist to song title?

Where will it put it in the song title? I have a lot of remixes and Im wondering if it will put it before the remix name or after? (in parenthesis)

Thanks!

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

Post by ZvezdanD » Mon Nov 24, 2014 1:31 pm

dalarath wrote:When I check the options to HIDE the buttons (icons) on the toolbar, initialy they hide but when I click anywhere they unhide by their own

This is caused by the bug of the program itself that I already reported to MM developers: http://www.ventismedia.com/mantis/view.php?id=12074

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

Post by dalarath » Mon Nov 24, 2014 1:09 pm

Hi,

First of all I want to thank you for making this great plugin. I'm looking forward to the new version and I'm seriously considering to support you work.

Until that, I want to inform about a possible error:

I'm running MM 4.1.1.1703 Gold and everyting works fine besides the buttons. When I check the options to HIDE the buttons (icons) on the toolbar, initialy they hide but when I click anywhere they unhide by their own and even appears a new one (see image below) with no dialog box

Image

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

Post by chrisjj » Wed Oct 29, 2014 2:08 pm

ZvezdanD wrote:"Find what ... From" and "Replace with ... In" doesn't make sense in English anyway.


"Find what ... From" does not makes sense. "Replace with ... In" does make sense.

ZvezdanD wrote:The Track Volume database field is numerical and it cannot be empty.


Since the MM UI does allow empty, I suggest the script should make the necessary conversion. They user should not have to guess from a VB conversion error whatever workaround is needed for an internal representation limitation.

ZvezdanD wrote:MediaMonkey uses -999999 value internally when it is unspecified.


OK, so I shall use -999999 to represent empty.

I suggest the script would be better if its UI input value interpretation was consistent with that MediaMonkey UI's.

ZvezdanD wrote:You should not use the empty string if you want to clear that field


I suggest it would be better for the script not to fail with a VB script compilation error just because it accepted a UI input value that it cannot further process.

ZvezdanD wrote:The Find Next button is not unexpectedly disabled. When that button is disabled that means that there is no more tracks that could be searched in the current direction (e.g. if you have selected 10 tracks and the current one is 10th)...

I was unexpected by me, since there's no such mention in the docs and no visible indication of current.

ZvezdanD wrote:There is already the "Reset Track Volume field" that could be user-modified changing the Track Volume in the Into combo box to the Album Volume

Thanks.

ZvezdanD wrote:
chrisjj wrote:9 Given that Tag Manipulation Presets actually manipluates metadata in tags and dabase, I think that command name is misleading. Better would be Metadata Manipulation Presets.

I didn't see that anybody is complaining to the author of the MP3Tag for the name of his program.


The only metadata Mp3tag manipulates is in the tag. Your program is manipulating data in the database.

ZvezdanD wrote:Many users don't know what is the "metadata", but many of them are heard for the "tag".

The MediaMonkey UI uses tag to refer to the tag, not the database record. I think it would be nice if your script accorded.

Thank you for the improvements.

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

Post by ZvezdanD » Wed Oct 29, 2014 10:07 am

chrisjj wrote:1 "Find what ... Into" http://i.imgur.com/gGsDSlO.png does not make sense in English. I think what is meant is "Find what ... In"

Well, English is not my native language and I though that "in" is the same as "into". I didn't want to use such short label as "In", so I decided to use "Into". It would be unpractical to change that now because of the compatibility with the existing presets since they have "Into" word in them. Also, there is "<Into Field>" tag that exists in many presets which is related to the value set in the Into combo box.

Besides, the new version (which is in development) will have an option to switch roles for Into and From combo boxes, i.e. it could have "Find what ... From" and "Replace with ... Into". With that new option it will be possible to search for one field and replace value in some another field (the current version allows only to replace value of the same field that is searching, unless some hacking that could be done using VBScript expressions with the Execute statement as it is used in the "Swap <From Field> and <Into Field>" preset). "Find what ... From" and "Replace with ... In" doesn't make sense in English anyway.

chrisjj wrote:2 The "n selected tracks" button label http://i.imgur.com/gGsDSlO.png overfills the button

That is already changed in the new version.

chrisjj wrote:3 When I try this Replace of any Track Volume value with null http://i.imgur.com/0InqTl0.png, I get an error Microsoft VBScript compilation error: http://i.imgur.com/Vo3hfW5.png
4 When Track Volume is null, Old Track Volume shows a nonsense value: http://i.imgur.com/hGjdPQF.png . Replace All gives a different error: http://i.imgur.com/HsQapX8.png

The Track Volume database field is numerical and it cannot be empty. MediaMonkey uses -999999 value internally when it is unspecified. You should not use the empty string if you want to clear that field, as you could see if you select the "Reset Track Volume field" preset.

chrisjj wrote:5 The Find Next button can b unexpectedly disabled http://i.imgur.com/COZAtaD.png
6 The Find Next button on http://i.imgur.com/COZAtaD.png becomes enabled if I click the 'n selected tracks' button twice http://i.imgur.com/nq5JU8d.png, but then clicking Find Next does nothing except disable the button.
7 Here http://i.imgur.com/ILnDoNK.png clicking Find Next does nothing initially, but repeated does eventually scroll the (unlabelled) list.

The Find Next button is not unexpectedly disabled. When that button is disabled that means that there is no more tracks that could be searched in the current direction (e.g. if you have selected 10 tracks and the current one is 10th), or the finding is done with all tracks without any matching. You could toggle "Backward search direction" and it might be enabled again.

chrisjj wrote:8 It would be nice to have preset to delete Album Volume

There is already the "Reset Track Volume field" preset that could be user-modified changing the Track Volume in the Into combo box to the Album Volume, then you could save it as the new preset by click on the Add button. That is just two or three clicks and a few keystrokes to rename the preset. There are already too much included presets, for most users they are overwhelming and if I start to add such trivial presets that requires two or three clicks to customize some existing preset then nobody would like that.

chrisjj wrote:9 Given that Tag Manipulation Presets actually manipluates metadata in tags and dabase, I think that command name is misleading. Better would be Metadata Manipulation Presets.

I didn't see that anybody is complaining to the author of the MP3Tag for the name of his program. There are also many other programs which have Tag in their name even when they store metadata in their databases. Many users don't know what is the "metadata", but many of them are heard for the "tag".

Anyway, thanks for the reports and suggestions.

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

Post by chrisjj » Wed Oct 29, 2014 6:25 am

Trying the current download from the root message, RegExp Find and Replace V4.3, on MM 1708 on Win 7 Pro 64-bit with Windows Classic desktop theme.

1 "Find what ... Into" http://i.imgur.com/gGsDSlO.png does not make sense in English. I think what is meant is "Find what ... In"
2 The "n selected tracks" button label http://i.imgur.com/gGsDSlO.png overfills the button
3 When I try this Replace of any Track Volume value with null http://i.imgur.com/0InqTl0.png, I get an error Microsoft VBScript compilation error: http://i.imgur.com/Vo3hfW5.png
4 When Track Volume is null, Old Track Volume shows a nonsense value: http://i.imgur.com/hGjdPQF.png . Replace All gives a different error: http://i.imgur.com/HsQapX8.png
5 The Find Next button can b unexpectedly disabled http://i.imgur.com/COZAtaD.png (viewtopic.php?f=2&t=28510 says "in the Find what text box you could enter string which you want to find inside of the MM field specified in the Into dropdown list, and after click on the Find Next button you should get the first track which contain matching criteria.")
6 The Find Next button on http://i.imgur.com/COZAtaD.png becomes enabled if I click the 'n selected tracks' button twice http://i.imgur.com/nq5JU8d.png, but then clicking Find Next does nothing except disable the button.
7 Here http://i.imgur.com/ILnDoNK.png clicking Find Next does nothing initially, but repeated does eventually scroll the (unlabelled) list. Perhaps it is finding a match but just failing to highlight the match.
8 It would be nice to have preset to delete Album Volume, to fix this problem: viewtopic.php?f=1&t=78027&p=396569&hilit=Analyse#p396569
9 Given that Tag Manipulation Presets actually manipluates metadata in tags and dabase, I think that command name is misleading. Better would be Metadata Manipulation Presets.

Top