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

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

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

Post by ZvezdanD »

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.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
MMFrLife
Posts: 2894
Joined: Fri Oct 26, 2012 9:04 pm
Location: MM Forum

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

Post by MMFrLife »

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 lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
😜
jcfogerty
Posts: 95
Joined: Sat Feb 16, 2008 2:44 pm

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

Post by jcfogerty »

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: 2894
    Joined: Fri Oct 26, 2012 9:04 pm
    Location: MM Forum

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

    Post by MMFrLife »

    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 lic. 2012) "Trying to imagine life without music gives me a headache"
    Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
    Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
    MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
    || software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
    "The absurd is the essential concept and the first truth"
    😜
    jcfogerty
    Posts: 95
    Joined: Sat Feb 16, 2008 2:44 pm

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

    Post by jcfogerty »

    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: 2894
    Joined: Fri Oct 26, 2012 9:04 pm
    Location: MM Forum

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

    Post by MMFrLife »

    jcfogerty,
    So, "Copy <From ..> to <Into ..>" worked when you "personally" updated it with: both F/RW fields as "^.*" ?
    MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
    Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
    Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
    MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
    || software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
    "The absurd is the essential concept and the first truth"
    😜
    MMFrLife
    Posts: 2894
    Joined: Fri Oct 26, 2012 9:04 pm
    Location: MM Forum

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

    Post by MMFrLife »

    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 lic. 2012) "Trying to imagine life without music gives me a headache"
    Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
    Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
    MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
    || software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
    "The absurd is the essential concept and the first truth"
    😜
    MMFrLife
    Posts: 2894
    Joined: Fri Oct 26, 2012 9:04 pm
    Location: MM Forum

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

    Post by MMFrLife »

    ...also "B02-alt1" doesn't work either.
    MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
    Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
    Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
    MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
    || software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
    "The absurd is the essential concept and the first truth"
    😜
    MMFrLife
    Posts: 2894
    Joined: Fri Oct 26, 2012 9:04 pm
    Location: MM Forum

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

    Post by MMFrLife »

    Well, nevermind. It appears to be working now.
    MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
    Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
    Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
    MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
    || software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
    "The absurd is the essential concept and the first truth"
    😜
    MMFrLife
    Posts: 2894
    Joined: Fri Oct 26, 2012 9:04 pm
    Location: MM Forum

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

    Post by MMFrLife »

    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 lic. 2012) "Trying to imagine life without music gives me a headache"
    Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
    Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
    MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
    || software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
    "The absurd is the essential concept and the first truth"
    😜
    ZvezdanD
    Posts: 3257
    Joined: Thu Jun 08, 2006 7:40 pm

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

    Post by ZvezdanD »

    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.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
    MMFrLife
    Posts: 2894
    Joined: Fri Oct 26, 2012 9:04 pm
    Location: MM Forum

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

    Post by MMFrLife »

    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 lic. 2012) "Trying to imagine life without music gives me a headache"
    Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
    Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
    MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
    || software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
    "The absurd is the essential concept and the first truth"
    😜
    ZvezdanD
    Posts: 3257
    Joined: Thu Jun 08, 2006 7:40 pm

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

    Post by ZvezdanD »

    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.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
    MMFrLife
    Posts: 2894
    Joined: Fri Oct 26, 2012 9:04 pm
    Location: MM Forum

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

    Post by MMFrLife »

    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 lic. 2012) "Trying to imagine life without music gives me a headache"
    Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
    Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
    MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
    || software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
    "The absurd is the essential concept and the first truth"
    😜
    ZvezdanD
    Posts: 3257
    Joined: Thu Jun 08, 2006 7:40 pm

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

    Post by ZvezdanD »

    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.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
    Post Reply