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

Download and get help for different MediaMonkey for Windows 4 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 »

Ummm. Don't you want to do this in the Disk Burning Wizard, e.g. "Left(<Title>,29)" when you burn the CD.
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
Fang

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

Post by Fang »

Owyn wrote:Ummm. Don't you want to do this in the Disk Burning Wizard, e.g. "Left(<Title>,29)" when you burn the CD.

Thx for the reply. New to MM and really like it but could you breakdown the Disk Burning Wizard for me. I understand the "Left(<Title>,29)" part but where would I enter this in the Disk Burning Wizard?
Thanks for your help.
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 »

See:
Burning a CD/DVD and
Directory & File Formats

The mask is used in "Disc Format:"

Edit: The mask e.g. should be "$Left(<Title>,29)" although that might need to 28 if the "." is included in the max 32 characters filename+extension. Typo in the first example, the "$" was missing.
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
Fang

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

Post by Fang »

Owyn wrote:See:
Burning a CD/DVD and
Directory & File Formats

The mask is used in "Disc Format:"

Edit: The mask e.g. should be "$Left(<Title>,29)" although that might need to 28 if the "." is included in the max 32 characters filename+extension. Typo in the first example, the "$" was missing.
Thanks Owyn! It works like a charm!
FunnyFish
Posts: 8
Joined: Fri Jun 06, 2008 11:29 am

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

Post by FunnyFish »

Hi, I have been usiing RegExp on a regular basis for motnhs now and think it's a wonderful add-on. However, since a few days I get this error on MM start-up:

Error #457
This key is already associated with an element of this collection
File: C: \\progra~1\mediamonkey\scripts\auto\regexpreplace.vbs, line: 118, column: 4


After this one, a standard dialog window with the same text.

Completely uninstalled RexEpx, started the .mmip file again, with the same results after the installation dialog. I'm wondering what 's going wrong: any suggestions?

MM version: 3.2.0.1294
Script Version: freshly installed the latest version from the forum page (3.6.xxx I think).

http://www.mediamonkey.com/forum/postin ... =2&t=28510#
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

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

Post by nynaevelan »

Have you done something recently to your database, added a new script? I use it daily and I do not run into any problems.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
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 »

Same as Nyn. I use the script almost every day without problems.

Hmmm. Bex had a similar problem with either ADD or SQL-Viewer. Exit and restart MM avoided the error, but, he was able to fix the problem in source.
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 »

FunnyFish wrote:I'm wondering what 's going wrong: any suggestions?
I think you have one custom field named "Mood". If this is a case, you could try with another name.
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:
FunnyFish wrote:I'm wondering what 's going wrong: any suggestions?
I think you have one custom field named "Mood". If this is a case, you could try with another name.
Good call. That makes a lot of sense after looking at the code.
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
someone thats not the other one

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

Post by someone thats not the other one »

Hello,

I Recently moved from Vista to Windows7. Everything works fine now, except for this message at start-up. RegExp works fine, but it's just an annoying thing.
The same messega was shown when I installed this script. I didn't get this error at the time I used Vista. Any help? Thnx:)

Image
someone that is the one

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

Post by someone that is the one »

someone thats not the other one wrote:Everything works fine now, except for this message at start-up.
I think you have switched to the localized (non-English) version of Windows and have created presets with some version of this script older than v3.4.2. Take a look at the Edit / RegExp Presets sub-menu - the first missing preset on the end of the list is problematic. Open the Edit / RegExp Export/Import dialog box and take a look at that preset, if you see "toolbar: true_in_your_language" instead of "toolbar: true" then you have only one solution: open the MediaMonkey.ini file into Notepad and within the [RegExpPresets] section replace all "true_in_your_language" with "true". There is one more easier solution, if you don't care about your own created or modified presets - you could just re-install the latest version of the script, but when you uninstall it you should choose Yes on its ask to remove settings.
mzd
Posts: 1
Joined: Fri Jan 08, 2010 5:53 pm

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

Post by mzd »

Hello all.

FIrst, I would like to thank the author of this great plug-in - very amazing! SO useful!

I have a question / request.

Could someone please help me to create a renaming regular expression that would do the following:
I need the maximum file name and directory name to be 38 characters long. As well, if shortening the file name ends up making all of the files in that directory have the same name, then I would like the to append numbers to the end of the file name. For example, the files shown below would have the same name if shortened to 38 characters.:

Quote:
Sinatra, Frank & Tony Bennet & Sammie Davis Jr - The Best is Yet to Come.mp3
becomes
Quote:
Sinatra, Frank & Tony Bennet & Sammie.mp3
and
Quote:
Sinatra, Frank & Tony Bennet & Sammie Davis Jr - New York, New York.mp3
becomes
Quote:
Sinatra, Frank & Tony Bennet & Sammie.mp3
so they have the same name, hence I would like to add a suffix of two digit numbers, starting at 01. So the originals would become
Quote:
Sinatra, Frank & Tony Bennet & Sammie01.mp3
Quote:
Sinatra, Frank & Tony Bennet & Sammie02.mp3

As well, I need to replace any occurrence of "[<>=?:;"*+,|]" in both the directory and file name with an underscore "_".

So, it would need to modify the following directory

/home/music/The Best of the Rat Pack + more/

to

/home/music/The Best of the Rat Pack _ more/
Guest

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

Post by Guest »

I love you dude! :)
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

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

Post by Vyper »

Guest wrote:I love you dude! :)
What the? Image
Stop Button Freak
Rojer
Posts: 65
Joined: Tue Aug 22, 2006 5:06 am

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

Post by Rojer »

Thank you for that script. Hard to state how useful it will be for so many people.

As ever, my brain is in trouble with regular expressions: I tried to edit a preset (fix common typo's, dont, wont etc) and add [in' ->ing], which includes a potentially troublesome ' .

I just added
|(in')
in the source field and
"$8", "ing"
in destination

Script still works for $1 to $7 but doesn't like my $8...

is the ['] subject to an escape sequence (\') ? Not that I didn't try, but I know little: maybe \ doesn't escape at all, it seems not to. So far, $8 works for anything that has no ' in it...
Post Reply