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 dtsig » Sat Aug 29, 2015 7:10 am

ZvezdanD wrote:
dtsig wrote:Would it be possible to put a keycombo to run one of the presets. So if i have 255 as an preset, could there be a way to set say Ctrl+Shift+R to automatically run that specific preset on selected items ... this would be really sweet. Not having to go into the window .. .select a preset ... run .. close

Here is the excerpt from the Usage section:
"The next control is the Shortcut text box which could be used to specify keyboard hotkey for the selected preset, for example Ctrl+T, which allows us to apply such preset to the selected tracks by the press on that hotkey."

And, if you prefer mouse over keyboard, there is another way to apply some preset without opening any dialog box or searching the wanted preset in the Tag Manipulation Presets menu:
"After that we have the Toolbar button check box which should be checked on if we want to get the toolbar button for the selected preset displayed on the main toolbar".

Missed it .. sorry will read harder. Thanks

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

Post by dtsig » Sat Aug 29, 2015 7:08 am

Guest wrote:@dtsig

I finally figured it out. I needed to use 'vbNewline'
Thanks for the input, though.

Great to know ...

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

Post by dtsig » Sat Aug 29, 2015 7:07 am

ZvezdanD wrote:
dtsig wrote:If the first 4 characters are "S"##"E" then don't run
If the last 6 characters are "- "#### then don't run

Find what: ^(?!S\d\dE\d\d).*
Replace with: IIf(IsNumeric(oSongData.SeasonNumber) And IsNumeric(oSongData.EpisodeNumber) And (Len("$_") > 5 Imp Mid("$_", Max(Len("$_") - 5, 0), 2) <> "- " And Not IsNumeric(Right("$_", 4))), "S" & Right("0" & oSongData.SeasonNumber, 2) & "E" & Right("0" & oSongData.EpisodeNumber, 2) & IIf(Len("$_") > 0, " ", ""), "") & "$_"

Oh man .. i sure wish I spoke martian <G> ... thanks a lot. Will give that a try

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

Post by ZvezdanD » Sat Aug 29, 2015 3:36 am

dtsig wrote:If the first 4 characters are "S"##"E" then don't run
If the last 6 characters are "- "#### then don't run

Find what: ^(?!S\d\dE\d\d).*
Replace with: IIf(IsNumeric(oSongData.SeasonNumber) And IsNumeric(oSongData.EpisodeNumber) And (Len("$_") > 5 Imp Mid("$_", Max(Len("$_") - 5, 0), 2) <> "- " And Not IsNumeric(Right("$_", 4))), "S" & Right("0" & oSongData.SeasonNumber, 2) & "E" & Right("0" & oSongData.EpisodeNumber, 2) & IIf(Len("$_") > 0, " ", ""), "") & "$_"

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

Post by Guest » Sat Aug 29, 2015 3:29 am

@dtsig

I finally figured it out. I needed to use 'vbNewline'
Thanks for the input, though.

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

Post by ZvezdanD » Sat Aug 29, 2015 2:42 am

dtsig wrote:Would it be possible to put a keycombo to run one of the presets. So if i have 255 as an preset, could there be a way to set say Ctrl+Shift+R to automatically run that specific preset on selected items ... this would be really sweet. Not having to go into the window .. .select a preset ... run .. close

Here is the excerpt from the Usage section:
"The next control is the Shortcut text box which could be used to specify keyboard hotkey for the selected preset, for example Ctrl+T, which allows us to apply such preset to the selected tracks by the press on that hotkey."

And, if you prefer mouse over keyboard, there is another way to apply some preset without opening any dialog box or searching the wanted preset in the Tag Manipulation Presets menu:
"After that we have the Toolbar button check box which should be checked on if we want to get the toolbar button for the selected preset displayed on the main toolbar".

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

Post by dtsig » Fri Aug 28, 2015 5:17 pm

Help with regexp please ..

The great preset i was give works great. But to be sure I don't DOUBLE join is there a way to make sure that it wont work in the following situation ..

If the first 4 characters are "S"##"E" then don't run
If the last 6 characters are "- "#### then don't run (this is for a modifie version of the preset that adds dates to then of films)

I have not been able to work this out. I think I have said before .. there is something about regular expressions I just don't get <G> probably the Old Dog/New tricks thing

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

Post by dtsig » Fri Aug 28, 2015 5:02 pm

ZvezdanD
Would it be possible to put a keycombo to run one of the presets. So if i have 255 as an preset, could there be a way to set say Ctrl+Shift+R to automatically run that specific preset on selected items ... this would be really sweet. Not having to go into the window .. .select a preset ... run .. close

Don't try this at home without a backup <G>

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

Post by dtsig » Thu Aug 27, 2015 4:20 pm

try

& vbCr

that *should* work

or

& Chr(13)

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

Post by Guest » Thu Aug 27, 2015 11:10 am

Hi

I'm using this to add 'Checked and Edited:' in bulk to the end of existing Lyrics. Preset 47 does that to a point, but I want to put in a carriage return (newline) before the text is added. I think I need to use vb to do the replace but It's got me foxed in this context. Can anyone help me with that, please. Thanks

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

Post by NWDreamer » Wed Aug 26, 2015 6:46 am

Great! Nice to see any addon author being as on top of things too! :D

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

Post by ZvezdanD » Wed Aug 26, 2015 5:24 am

NWDreamer wrote:In Extensions it says I'm using v4.4.0.1 of your script.

I have fixed the mentioned problem in v4.4.1. Thank you for the report.

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

Post by NWDreamer » Wed Aug 26, 2015 12:51 am

Your comment had me dig into things a bit (since I just started using your addon, I had forgotten to look at the preset options and code). I found that the Auto-Increment preset was now looking at the Title field (as expected) instead of the Track # field for both input & output. I changed these back to Track # and confirmed that the preset worked again. Going farther, here's what I've found out: Changing the starting number alters the preset to use the Title field for both input and output (i.e., without my doing anything other than changing the starting number in the dialog). Below are five screenshots with notations that show this behavior. The first three show a corrected preset and, also, correct operation when using a starting number of 1. The last two show what happens when you change the starting number to 3. Since the screenshots are large, I'm only including links.

http://www.nwdreamer.com/pics/MediaMonkey/Auto-Increment-Screen-1.jpg

http://www.nwdreamer.com/pics/MediaMonkey/Auto-Increment-Screen-2.jpg

http://www.nwdreamer.com/pics/MediaMonkey/Auto-Increment-Screen-3.jpg

http://www.nwdreamer.com/pics/MediaMonkey/Auto-Increment-Screen-4.jpg

http://www.nwdreamer.com/pics/MediaMonkey/Auto-Increment-Screen-5.jpg

In Extensions it says I'm using v4.4.0.1 of your script. I'm also using MM v4.1.8.1751 Portable Mode. If you don't get the same results, let me know what you'd like me to check or try.

Craig

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

Post by ZvezdanD » Tue Aug 25, 2015 3:08 am

NWDreamer wrote:Any idea what caused this and how I can fix it?

Most probably you have modified that preset changing Into field from Track # to Title. If you haven't, please post the screenshot of the RegExp Find & Replace dialog box with the mentioned preset selected.

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

Post by NWDreamer » Tue Aug 25, 2015 2:18 am

Ok, I've got a weird (and annoying) one... I've been using the "Auto-increment Track number with specified starting value" preset for awhile and it's worked fine (but always with a starting value of 1). I had one large album where the first two songs were fine so I selected the rest and set the starting value to 3. Instead of changing the track number field, it put the track number into the Title field instead, obviously wiping out all the titles... A couple more tries and it still didn't work so I fixed that album manually and didn't think about it until now when I went to add track numbers to an entire album so I set the starting value back to 1 and, again, it put all the track numbers into the Title field; wiping out the titles that were there...

Now it doesn't seem to want to work correctly no matter what I do and I'm REALLY tired of having to re-enter song titles! Any idea what caused this and how I can fix it? I was using that preset quite a bit prior to this.

Thanks,

Craig

Top