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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

ZvezdanD
Posts: 3096
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD » Wed Feb 15, 2017 4:01 pm

MMFrLife wrote:What to do?
Did you try to add "\d+D" to uppercase exceptions? Or maybe to the Specific string?
MMFrLife wrote:I noticed that it didn't stay the same when using that preset on it, alerting me to the issue. :(
I don't understand what you are saying.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

MMFrLife
Posts: 2774
Joined: Fri Oct 26, 2012 9:04 pm

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

Post by MMFrLife » Wed Feb 15, 2017 5:38 pm

ZvezdanD wrote:Did you try to add "\d+D" to uppercase exceptions? Or maybe to the Specific string?
Ok, that looks like it's gonna do it!
I was messing around with letter ranges in the Uppercase section, but hadn't tried something that simple :-? .
ZvezdanD wrote:I don't understand what you are saying.
Don't worry about that. I was just saying that I happened to notice when the preset was run on that album and it changed it to "[2d]" instead
of it staying the same. I run the batches (and some singles) on all tracks/albums, regardless if it needs it; so as to catch the ones that do.
...en masse efficiency
MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
track properties; dir/fn mask configurations; check out ZvezdanD's scripts
MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
Backup 6.0; Clear Now Playing Button 1.2
...always back it up, especially before doing anything major!!!
Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

jcfogerty
Posts: 89
Joined: Sat Feb 16, 2008 2:44 pm

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

Post by jcfogerty » Sun Feb 19, 2017 4:24 pm

MMFrLife wrote:
    Just to clarify, by "datestamp", you mean the date aspect of the "Timestamp"?
    It works fine here using - Copy <From FIeld> to <lnto Field> - "Last Played" to " "Timestamp". It alters the WinExp properties view.
    It won't work via "Date" as that field would not be able to handle the time (ex. 2:00 pm) signature of "Last Played" and also does not reflect the timestamp's date/time.
    No, I used "timestamp" and it did not work.

    MMFrLife
    Posts: 2774
    Joined: Fri Oct 26, 2012 9:04 pm

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

    Post by MMFrLife » Sun Feb 19, 2017 9:19 pm

    jcfogerty wrote:No, I used "timestamp" and it did not work.
    This has already been worked out. See 4 posts starting here
    MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
    track properties; dir/fn mask configurations; check out ZvezdanD's scripts
    MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
    Backup 6.0; Clear Now Playing Button 1.2
    ...always back it up, especially before doing anything major!!!
    Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

    jcfogerty
    Posts: 89
    Joined: Sat Feb 16, 2008 2:44 pm

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

    Post by jcfogerty » Wed Feb 22, 2017 3:01 pm

    MMFrLife wrote:
    jcfogerty wrote:No, I used "timestamp" and it did not work.
    This has already been worked out. See 4 posts starting here
    Thanks - that did work once the add-in was updated. Here is what worked...

    Under Preset Settings...

    Find What: ^.*
    "Into: Timestamp", Regular expression 1 checked, Full

    Replace with: ^.*
    "From: Last Played", Regular expression 2 checked, Full

    MMFrLife
    Posts: 2774
    Joined: Fri Oct 26, 2012 9:04 pm

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

    Post by MMFrLife » Wed Feb 22, 2017 5:04 pm

    jcfogerty,
    So, "Copy <From ..> to <Into ..>" worked when you "personally" updated it with: both F/RW fields as "^.*" ?
    MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
    track properties; dir/fn mask configurations; check out ZvezdanD's scripts
    MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
    Backup 6.0; Clear Now Playing Button 1.2
    ...always back it up, especially before doing anything major!!!
    Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

    MMFrLife
    Posts: 2774
    Joined: Fri Oct 26, 2012 9:04 pm

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

    Post by MMFrLife » Wed Feb 22, 2017 8:23 pm

    Possible bug?

    If I'm using the preset "Remove specified number of words from begin of <Into Field>"
    with something like,

    "Alternate song"
    "alternate 02 songs from the wood"
    "alt02-1b"

    They work.

    But if the first word starts with a digit,

    "02B-alt1"

    It doesn't get recognized.

    If that same thing is the second word, it gets recognized.
    "number 02B-alt1"

    My assumption is that a word is "any" string that begins and ends with a space or a single non-space character begun and ended with a space.
    MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
    track properties; dir/fn mask configurations; check out ZvezdanD's scripts
    MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
    Backup 6.0; Clear Now Playing Button 1.2
    ...always back it up, especially before doing anything major!!!
    Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

    MMFrLife
    Posts: 2774
    Joined: Fri Oct 26, 2012 9:04 pm

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

    Post by MMFrLife » Wed Feb 22, 2017 8:32 pm

    ...also "B02-alt1" doesn't work either.
    MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
    track properties; dir/fn mask configurations; check out ZvezdanD's scripts
    MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
    Backup 6.0; Clear Now Playing Button 1.2
    ...always back it up, especially before doing anything major!!!
    Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

    MMFrLife
    Posts: 2774
    Joined: Fri Oct 26, 2012 9:04 pm

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

    Post by MMFrLife » Thu Feb 23, 2017 1:00 am

    Well, nevermind. It appears to be working now.
    MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
    track properties; dir/fn mask configurations; check out ZvezdanD's scripts
    MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
    Backup 6.0; Clear Now Playing Button 1.2
    ...always back it up, especially before doing anything major!!!
    Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

    MMFrLife
    Posts: 2774
    Joined: Fri Oct 26, 2012 9:04 pm

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

    Post by MMFrLife » Fri Feb 24, 2017 12:45 pm

    In "Caps with exceptions...", how do I also make articles after " - " capitalized?

    ex., album name is "What it Takes - The Chess Years -xb"
    If " - The" is already capped it remains so. If it is LC, it is capped.

    I tried a couple things but couldn't get it to go.
    Keep in mind, I'm using the modified version as discussed prior. It contains the "[ \t]" and "\w\-\[\.\" mods.

    I took the "\-" out of the word character section, but it still won't work.
    Or, is it impossible to except both " - the" (earlier in the string), and "-xb" (later in the string).
    MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
    track properties; dir/fn mask configurations; check out ZvezdanD's scripts
    MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
    Backup 6.0; Clear Now Playing Button 1.2
    ...always back it up, especially before doing anything major!!!
    Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

    ZvezdanD
    Posts: 3096
    Joined: Thu Jun 08, 2006 7:40 pm

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

    Post by ZvezdanD » Fri Feb 24, 2017 3:31 pm

    MMFrLife wrote:In "Caps with exceptions...", how do I also make articles after " - " capitalized?
    You should replace "(?!^)\b" in the predefined preset with "[\-:;.,]\W*|[ \t]+". There are added ":;.," beside of "-" after which a word should be capitalized, you could also add some another characters inside the first pair of [] brackets if you want to have a word capitalized after them.
    MMFrLife wrote:Or, is it impossible to except both " - the" (earlier in the string), and "-xb" (later in the string).
    Yes, it is impossible. As I said before, you should use the Specific string for your IDs. Or just use some Classification field.
    Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

    MMFrLife
    Posts: 2774
    Joined: Fri Oct 26, 2012 9:04 pm

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

    Post by MMFrLife » Fri Feb 24, 2017 10:27 pm

    ZvezdanD wrote:you should use the Specific string for your IDs.
    I actually tried that before you originally suggested it, but it didn't work.
    That works to except words that don't interfere with the "first and last words are capitalized" rule.
    However, the IDs are intended to go at the end, "not within" the name.

    It appears that no matter what version of the preset used, it continues to adhere to that rule.
    I even went back to the predefined preset and took out any symbols in the name of the album.

    If you put specific string "xb" in the LC section, and "xb" within the name, you get
    "What It Takes the Chess Years xb"
    resulting in "What It Takes the Chess Years Xb"

    If you have,
    "What It Takes the Chess Years lv xb"
    resulting in "What It Takes the Chess Years lv Xb"

    If you have "xb" within the name,
    "What It xb Takes the Chess Years"
    resulting in "What It xb Takes the Chess Years"

    Anyway, I'm about ready to give up and go back to the way I had it :-?.
    Any hyphenated subtitle situations I'll just run all my editing
    process batches and manually edit immediately after " - " for any fields it pertains to.

    Thanks
    MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
    track properties; dir/fn mask configurations; check out ZvezdanD's scripts
    MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
    Backup 6.0; Clear Now Playing Button 1.2
    ...always back it up, especially before doing anything major!!!
    Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

    ZvezdanD
    Posts: 3096
    Joined: Thu Jun 08, 2006 7:40 pm

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

    Post by ZvezdanD » Sat Feb 25, 2017 3:11 am

    MMFrLife wrote:I actually tried that before you originally suggested it, but it didn't work.
    ...
    If you put specific string "xb" in the LC section...
    It works just fine for me - if I put lv or xb in the Specific string, those your IDs would not be capitalized, even on the end of text.
    Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

    MMFrLife
    Posts: 2774
    Joined: Fri Oct 26, 2012 9:04 pm

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

    Post by MMFrLife » Sat Feb 25, 2017 6:07 am

    I appreciate you editing down your original reply to the only remaining point :wink:

    So, if it is supposed to be working stripped down (original preset, no symbols), then either I'm inserting into LC string section incorrectly
    or something is slightly off with my copy of the original preset.

    I will try again by extracting the "RegExpReplace.ini" from the .mmip, even though the one I used
    was imported from one that is in a read-only state.

    To insert, you just create "|xb|" or "|lv|", etc. in lowercase section, right?
    MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
    track properties; dir/fn mask configurations; check out ZvezdanD's scripts
    MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
    Backup 6.0; Clear Now Playing Button 1.2
    ...always back it up, especially before doing anything major!!!
    Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

    ZvezdanD
    Posts: 3096
    Joined: Thu Jun 08, 2006 7:40 pm

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

    Post by ZvezdanD » Sat Feb 25, 2017 8:01 am

    MMFrLife wrote:I appreciate you editing down your original reply to the only remaining point :wink:
    ;) I didn't want to enter into another discussion why you are wrong, but here are again some examples what could happen if you use your mod with the "-" as a word character: Afro-celt, Dark-eyed, Jean-michel, Kung-fu, Itsy-bitsy, Low-life, Non-stop, Ob-la-di, P-funk, Pan-african, Peek-a-boo, Pin-ups, Radio-activity, Rendez-vous, Set-up, Too-rye-ay, Trans-europa, White-out, X-ray...
    MMFrLife wrote:To insert, you just create "|xb|" or "|lv|", etc. in lowercase section, right?
    For the third time, it is the Specific section, not Lowercase.
    Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

    Post Reply