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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

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

Post by Owyn » Mon Feb 08, 2010 9:59 pm

Note that Tools->AutoTag from Filename is a MM standard function (ie. not a ReqExp preset).

Standard Search does not allow cross field compares, however, the Magic Nodes script lets you use arbritary SQL to populate a node, ie. "Artist = Album"
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies

botharg
Posts: 2
Joined: Sat Feb 07, 2009 3:40 am

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

Post by botharg » Sat Feb 13, 2010 11:00 pm

thaks for this wonderful piece of MM extension! I was looking for this functionality for ages, since I wanted to "clean-up" my tags from those "not-filesystem-compatible" characters. I'm using the auto-arrange feature, and there are always some characters that do not fit well with some filesystems and/or programs.

Nice work!!! :D

CoRsU
Posts: 345
Joined: Tue Dec 19, 2006 6:23 am
Location: DA-City, Germany

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

Post by CoRsU » Fri Feb 26, 2010 2:11 am

First I want to thank for the great Script, it alleviate my work with MM.
So I got a problem with my Napster Files, they're mostly tagged in awful format. Maybe somebody can help me to fix it, or there already strings for use.

I don't have actually examples but I will post them as soon as possible.

so thx for any suggestions...

CoRsU
Image

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

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

Post by trixmoto » Fri Feb 26, 2010 4:36 am

I used this script to sort out a compilation of 74 albums, each with 2 discs, all tracks in a complete state. I was a bit daunted by the incredibly complicated screen, but once I worked out I could use VBScript commands I was away and sailing - thank you very much for this very powerful script! :D
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

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

Post by Owyn » Fri Feb 26, 2010 6:39 am

Yeah. I use this script almost every day. It is very useful for quickly setting up "macros" for repetitive tasks via custom presets. Sort of micro-scripts.

The learning curve can be brutal, especially if you are not familiar with ReqExp syntax.

My own approach is:

Can I do it obviously with simple text or RegExp patterns?
Yes: Great.
No: Give up. Do it with Vbscript.

The bundled presets are a great reference and learning tool. They are stored in mediamonkey.ini, e.g.

Code: Select all

[RegExpPresets]
Preset1=Name: "Assign the rth  level folder of the Path to the Custom 2 field", Description: "You could change ""1"" in the ""Replace with"" to the appropriate folder level", Shortcut: "", Icon: "", Toolbar: False, FindWhat: "^.*", FindInto: "Custom 2", FindRegExp: True, WholeWord: False, ReplaceWith: "Split(oSongData.Path, ""\"")(4)", ReplaceFrom: "Path", ReplaceRegExp: False, ReplaceVBScr: True, MatchCase: False

...
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies

jimharland
Posts: 5
Joined: Wed Sep 23, 2009 10:57 pm

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

Post by jimharland » Fri Feb 26, 2010 3:19 pm

Great script!
I export the data from the Albums table to a table in a database I have created to store additional information. I use idAlbum as my primary key. The problem is that when I make a change to an album name in MediaMonkey, that application creates a new record with a different idAlbum, and my 2 databases are no longer synchronized. I would like to run a script that would assign idAlbum to a tag in the associated music files - so that the original id would not be lost when changes are made to album names. Can your script be used to do this. It would need to read idAlbum, which is in the MM.db not in a tag.
Kind regards, Jim Harland

Kevinowpb
Posts: 126
Joined: Sat Dec 22, 2007 10:18 am
Location: West Palm Beach
Contact:

Remove Artist (or any part of any of the Artist) from GENRE

Post by Kevinowpb » Sun Feb 28, 2010 9:23 am

Can someone post how to do that?

Removing the artist name (or any part of the artists) from Genre. .. i.e. Artist= 2 Pac ... Genre is 2pac; Rap; Hip Hop .... or Artist=2pac, Genre= 2pac; Rap; Hip Hop having it work for either way. (I guess that would have to broaden the section of the genre to include everything between the ; and ; or beginning of the field to the ; if its the first field, and everything from the ; to the end of the field where the genre that matches is at the end of the line..
get me?

?

Thanks!

Please help!

I hate having the artist as part of the genre...

Kevinowpb
Posts: 126
Joined: Sat Dec 22, 2007 10:18 am
Location: West Palm Beach
Contact:

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

Post by Kevinowpb » Sun Feb 28, 2010 9:34 am

Guest wrote:
Find what ^.* Into BPM, Replace with [0-9]{2,3}(?=\sBPM\)) From Title, RegExp 1 and 2 checked.
Find what \s\([0-9]{2,3}\sBPM\) Into Title, Replace with empty string.
Ok thank you very much.


Can whomever got this working do a screen shot of how you have it in the software and send it to me? koconnell@gmail.com

:)
Thanks!

CoRsU
Posts: 345
Joined: Tue Dec 19, 2006 6:23 am
Location: DA-City, Germany

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

Post by CoRsU » Wed Mar 03, 2010 2:30 am

Hey MM-Community,

now I post my problem wit Napster File Tagging. So, how can I fix it?

example:

old: The Way It Is (Extended Mix) [Extended Mix]/Extended Mix
new: The Way It Is (Extended Mix)

Is there any chance for a string to fix all the tags in one step?

Code: Select all

How to fix double entries in Title-Tag
--------------------------------------

The Way It Is (Extended Mix) [Extended Mix]/Extended Mix

Whoomp! (There It Is) (Eric Chase Remix) [feat. Tag Team] [Eric Chase Remix]/Eric Chase Remix

Back & Forth (Eric Chase RMX) [feat. Mr. V] [Eric Chase RMX]/Eric Chase RMX

No Other One (Ian Carey Remix Radio Edit) [Ian Carey Remix Radio Edit]/Ian Carey Remix Radio Edit

Why Don't You (Original Mix) [Original Mix]/Original Mix

Disco Pogo (Extended Mix) [Extended Mix]/Extended Mix

Laut (Bigroom Mix) [Bigroom Mix]/Bigroom Mix

New New New (Avicii Remix) [feat. Vybrate, Makedah & Queen Ifrica] [Avicii Remix]/Avicii Remix

Get Get Down (Original Mix) [Original Mix]/Original Mix

Devotion (Extended Vocal) [feat. Tony Scott] [Extended Vocal]/Extended Vocal

Hey Hey (DF's Attention Vocal Mix) [DF's Attention Vocal Mix]/DF's Attention Vocal Mix

Heads Will Roll (A-Trak Remix) [A-Trak Remix]/A-Trak Remix

I Think I Like It (Original Mix) [Original Mix]/Original Mix

Enjoy Music (Riva Starr Remix Edit) [Riva Starr Remix Edit]/Riva Starr Remix Edit

Flashback (David Guetta's One Love Remix) [David Guetta's One Love Remix]/David Guetta's One Love Remix

Took The Night (Extended Mix) [Extended Mix]/Extended Mix

You Know Why (PH Elektro Remix) [PH Elektro Remix]/PH Elektro Remix

Rock To The Beat (Club Mix) [feat. Nicco] [Club Mix]/Club Mix

Wire To Wire (Alex Davey Remix) [Alex Davey Remix]/Alex Davey Remix

Watching You (Extended Mix) [feat. Liz Kay] [Extended Mix]/Extended Mix

Excuse Me (Original Mix) [Original Mix]/Original Mix

She's A Nympho (Max Farenthide.club Mix) [Max Farenthide.club Mix]/Max Farenthide.club Mix

Anyway (Club Mix) [Club Mix]/Club Mix

The Drums (Avicii's Mouthful Remix) [feat. Capricorn] [Avicii's Mouthful Remix]/Avicii's Mouthful Remix

Feelin' (District One's Feelin' Techno Remix) [District One's Feelin' Techno Remix]/District One's Feelin' Techno Remix

In The Disco (Original Mix) [Original Mix]/Original Mix

Dama S Salon (Main Mix Edit) [feat. Dama S] [Main Mix Edit]/Main Mix Edit

Let It Rain (Cristian Marchi & Paolo Sandrini Main Mix) [Cristian Marchi & Paolo Sandrini Main Mix]/Cristian Marchi & Paolo Sandrini Main Mix

Confusion (B & C Pacha Mix) [feat. Roxanne] [B & C Pacha Mix]/B & C Pacha Mix

Drop The Gun (Erick Decks Remix) [Erick Decks Remix]/Erick Decks Remix

Insomnia (Chris Crime Infinity Remix) [Chris Crime Infinity Remix]/Chris Crime Infinity Remix

My Friend

Hold That Sucker Down (Original Mix) [Original Mix]/Original Mix

9 PM Reloaded (Club Version) [Club Version]/Club Version

It's Gonna Be Alright (Hi_Tack Remix) [Hi_Tack Remix]/Hi_Tack Remix

Come Get My Lovin' (Plastik Funk Remix) [feat. Marcella Woods] [Plastik Funk Remix]/Plastik Funk Remix

Back 2 NY (Nirvana Mix Edit) [Nirvana Mix Edit]/Nirvana Mix Edit

I Feel So… (Original Mix) [Original Mix]/Original Mix

Poptimistic (Bingo Players Vox Edit) [Bingo Players Vox Edit]/Bingo Players Vox Edit

Infatuation (Miles Dyson Mix) [Miles Dyson Mix]/Miles Dyson Mix

Let Me Sip My Drink (Dero Animal Remix) [feat. Fast Eddie] [Dero Animal Remix]/Dero Animal Remix

On Me (Dutch Version) [feat. Dadz N Effect] [Dutch Version]/Dutch Version

If I Had Known This Before

Feel My Body (Chriss Ortega Mix) [Chriss Ortega Mix]/Chriss Ortega Mix

Saxphunk (Luetzenkirchen Remix) [Luetzenkirchen Remix]/Luetzenkirchen Remix
Thx anyway
Image

Guest

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

Post by Guest » Wed Mar 03, 2010 3:38 am

CoRsU wrote:Is there any chance for a string to fix all the tags in one step?

Code: Select all

\s\[[^\]]*\]/.*?$

Guest

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

Post by Guest » Wed Mar 03, 2010 3:42 am

jimharland wrote:I would like to run a script that would assign idAlbum to a tag in the associated music files
Replace with: oSongData.Album.ID, VBScript: checked

Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Remove Artist (or any part of any of the Artist) from GENRE

Post by Owyn » Wed Mar 03, 2010 3:55 am

Kevinowpb wrote:Can someone post how to do that?

Removing the artist name (or any part of the artists) from Genre. .. i.e. Artist= 2 Pac ... Genre is 2pac; Rap; Hip Hop .... or Artist=2pac, Genre= 2pac; Rap; Hip Hop having it work for either way. (I guess that would have to broaden the section of the genre to include everything between the ; and ; or beginning of the field to the ; if its the first field, and everything from the ; to the end of the field where the genre that matches is at the end of the line..
get me?

?

Thanks!

Please help!

I hate having the artist as part of the genre...
Well, this is beyond the capability of RegExp as stated, too many complications and variations.

However, this is how I remove unwanted genres.

-> Basic Search Dialog->Genre:_
--- Should be no tracks found
--- This should create a new node in Search Results (Genre contains "_") (underscore)

-> Select Genre node in tree, expand Genres

-> Browse genres and
-- Left-click genre that you do not want to keep (e.g. 2 Pac), review track listing
-- Right-click, rename genre to _ (underscore)

-> Collapse and re-expand Genre node in tree (or use previous search result)
-- Genre _ should be the first one listed, Left-click it
-- Select all tracks

-> RegExp Find & Replace
-- Into:Genre
-- Find What:(; _)|(^_;)|(^_)
-- RegExp1: Checked
-- Replace With:
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies

Guest

Re: Remove Artist (or any part of any of the Artist) from GENRE

Post by Guest » Wed Mar 03, 2010 4:07 am

Kevinowpb wrote:Removing the artist name from Genre. .. i.e. Artist=2pac, Genre= 2pac; Rap; Hip Hop
Find what: ^.*, Into: Genre, Replace with: Mid(RegSub(";$&", ";\s?" & oSongData.ArtistName, ""), 2), VBScript: checked

Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Remove Artist (or any part of any of the Artist) from GENRE

Post by Owyn » Wed Mar 03, 2010 4:10 am

Guest wrote:
Kevinowpb wrote:Removing the artist name from Genre. .. i.e. Artist=2pac, Genre= 2pac; Rap; Hip Hop
Find what: ^.*, Into: Genre, Replace with: Mid(RegSub(";$&", ";\s?" & oSongData.ArtistName, ""), 2), VBScript: checked
Yeah. I thought of that, but, It breaks down when the genre string is only a part of the artist string.
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies

Guest

Re: Remove Artist (or any part of any of the Artist) from GENRE

Post by Guest » Wed Mar 03, 2010 4:14 am

Owyn wrote:Yeah. I thought of that, but, It breaks down when the genre string is only a part of the artist string.
Sorry, but I don't understand what you meant.

Post Reply