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 »

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

Code: Select all

\s\[[^\]]*\]/.*?$
Ummm (not tested).
Into:Title
Find What:(^.*\))(.*$)
Replace With:$1
Both regexp checked.

This should keep the start of the title including the first parenthesized string.

Edit: This was a first thing in the morning brain fart. Guest's solution should be exactly what you are looking for.
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: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by Guest »

Owyn wrote:This should keep the start of the title including the first parenthesized string.
Yeah, but what with [feat. Mr. V] in: Back & Forth (Eric Chase RMX) [feat. Mr. V] [Eric Chase RMX]/Eric Chase RMX?

I suppose he wants to get Back & Forth (Eric Chase RMX) [feat. Mr. V], not only Back & Forth (Eric Chase RMX).
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 »

Guest wrote:
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.
e.g. Artist="2pac feat. somebody_else), etc.
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
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 »

Guest wrote:
Owyn wrote:This should keep the start of the title including the first parenthesized string.
Yeah, but what with [feat. Mr. V] in: Back & Forth (Eric Chase RMX) [feat. Mr. V] [Eric Chase RMX]/Eric Chase RMX?

I suppose he wants to get Back & Forth (Eric Chase RMX) [feat. Mr. V], not only Back & Forth (Eric Chase RMX).
Yeah. Your regexp should strip the trailing, probably duplicate, text. Better fit.
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 »

Owyn wrote:e.g. Artist="2pac feat. somebody_else), etc.
Well, if he has genre= 2pac feat. somebody_else; Rap; Hip Hop, it will be removed as well. However, if he has artist=2pac feat. somebody_else and genre=2pac; Rap; Hip Hop then it is too complicated.
Guest

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

Post by Guest »

Owyn wrote:Yeah. Your regexp should strip the trailing, probably duplicate, text. Better fit.
Sorry, but I think that my regexp does exactly what he wants. Also, your regexp is not good with titles like "(I Can't Get No) Satisfaction" and similar where parenthesized text is not on the end of the string.
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 »

Guest wrote:
Owyn wrote:Yeah. Your regexp should strip the trailing, probably duplicate, text. Better fit.
Sorry, but I think that my regexp does exactly what he wants. Also, your regexp is not good with titles like "(I Can't Get No) Satisfaction" and similar where parenthesized text is not on the end of the string.
Agreed. :D
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
Kevinowpb
Posts: 129
Joined: Sat Dec 22, 2007 10:18 am
Location: West Palm Beach
Contact:

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

Post by Kevinowpb »

Guest wrote:
Owyn wrote:e.g. Artist="2pac feat. somebody_else), etc.
Well, if he has genre= 2pac feat. somebody_else; Rap; Hip Hop, it will be removed as well. However, if he has artist=2pac feat. somebody_else and genre=2pac; Rap; Hip Hop then it is too complicated.

I have fixed most of my feat. artists to be 2pac; Dr Dre with your RegExp find feat., vs., &, and replace with ;

so.. I'll give your theory a shot..

Isnt working...

Here is what I have... what's wrong?

Image
Guest

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

Post by Guest »

Kevinowpb wrote:Here is what I have... what's wrong?
Regular expression 1 (below the Into dropdown) should be checked on.
Guest

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

Post by Guest »

Kevinowpb wrote:so.. I'll give your theory a shot..
Anyway, it will not work if your artist name is different than the single item form genre. It doesn't matter if featuring artists are separated with "feat." or with ";". So, if you have Artist = "2pac; Dr Dre" and Genre = "2pac; Rap; Hip Hop" then it will not be removed with mentioned suggestion.
Guest

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

Post by Guest »

OK, if you have multi-item artists separated with ";", you should try with the next Replace with string:

Code: Select all

Mid(RegSub(";$&", ";\s?(" & RegSub(RegSub(oSongData.ArtistName, "(\W)", "\$1"), ";\s?", "|") & ")", ""), 2)
Guest

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

Post by Guest »

Sorry, the previous expression is not proper. Here is the correct one:

Code: Select all

LTrim(Mid(RegSub(";$&", ";\s?(" & RegSub(RegSub(oSongData.ArtistName, "([^;\w])", "\$1"), ";\s?", "|") & ")", ""), 2))
SpritHansi
Posts: 57
Joined: Sun Jun 18, 2006 4:43 pm

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

Post by SpritHansi »

Hi!
I want to replace all { & [ with (, and ] & } with )
Help.... :o
Regards
SpritHansi
Guest

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

Post by Guest »

SpritHansi wrote:I want to replace all { & [ with (, and ] & } with )
Find what: (\[|{)|(\]|})
Regexp 1: checked
Replace with: MapArray(Array("$1", "(", "$2", ")"))
VBScript: checked
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 »

Replace with: MapArray(Array("$1", "(", "$2", ")"))
Nice. I would have wimped out with two separate operations.
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
Post Reply