RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
Regex and dates
These days using MM5 but gone back to MM4 to complete a project with "Regexp Find & Replace". I have a bunch of about 1,000 Old Time Radio serials that have been named as follows in the title:
mm/dd/yy - Episode ### - Episode Name
I would like to swap the date part of it to be "yy/mm/dd" but no amount of searching or trial and error has given me a solution. Mind you, I'm not a programmer, just a tinkerer and get easily confused with some of the presets. Most likely staring me in the face, but be damned if I can see it.
Any assistance appreciated.
mm/dd/yy - Episode ### - Episode Name
I would like to swap the date part of it to be "yy/mm/dd" but no amount of searching or trial and error has given me a solution. Mind you, I'm not a programmer, just a tinkerer and get easily confused with some of the presets. Most likely staring me in the face, but be damned if I can see it.
Any assistance appreciated.
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
Find what: ^(\d\d/\d\d)(?:/(\d\d))
Replace with: $2/$1
● 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
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
@ZvezdanD
Many thanks for that answer. My dilemma was solved and fully utilized within minutes of my reading your post.
In appreciation, I sent a donation to help with your possible porting to MM5. I for one look forward to that becoming a reality.
Cheers
Many thanks for that answer. My dilemma was solved and fully utilized within minutes of my reading your post.
In appreciation, I sent a donation to help with your possible porting to MM5. I for one look forward to that becoming a reality.
Cheers
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
Hi and I hope you all are doing well.
What preset would be best to use or edit in order to keep the key but remove the dash and everything after it like:
9A - www,viperial,com
9A - PMEDIA
9A - bf570f03-5287-45f5-aaa2-21ba6a4d585f
but I need to also keep two key tags like:
9B/9A
Thank you,
What preset would be best to use or edit in order to keep the key but remove the dash and everything after it like:
9A - www,viperial,com
9A - PMEDIA
9A - bf570f03-5287-45f5-aaa2-21ba6a4d585f
but I need to also keep two key tags like:
9B/9A
Thank you,
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
Hi,
Bit off topic, but:
FYI MM5 support Initial Key natively, so when I do DJ set and want to have wide diversity of Track keys so that I can easily do Harmonic mixing I use "<Initial Key>\<BPM> -!- <Title> - <Artist>" As sync Mask for Tracks And my GIG USB drive so I can easily locate them no matter what I use at gig.
On Topic:
If Format is correct The best would be to Trim space on read Initial Key and store it in one of Custom Tags that can be eaasily used in MM4 also.
Bit off topic, but:
FYI MM5 support Initial Key natively, so when I do DJ set and want to have wide diversity of Track keys so that I can easily do Harmonic mixing I use "<Initial Key>\<BPM> -!- <Title> - <Artist>" As sync Mask for Tracks And my GIG USB drive so I can easily locate them no matter what I use at gig.
On Topic:
If Format is correct The best would be to Trim space on read Initial Key and store it in one of Custom Tags that can be eaasily used in MM4 also.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
In the enhanced version, there are multiple "Keep..." presets spread across multiple menu classes
Maybe these from the 'Word Manipulations' menu will help for those particular examples:
Keep only specified number of words on the start of <Into Field>...
Keep only specified number of words on the end of <Into Field>...
Keep only specified number of words after left-specified position in <Into Field>...
Keep only specified number of words before right-specified position in <Into Field>...
I'm guessing the first one.
Huh?
Only the '9A' part is in the examples above. Are you talking about another scenario/field?
Examples?
Last edited by MMFrLife on Sat Mar 05, 2022 3:08 pm, edited 1 time in total.
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"
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"
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
The "Keep ..." presets from the "Separated field parts" menu are intended exactly for that, with the dash specified as separator. Although, these presets are just a special case of the presets from the "Partial manipulations" menu, which could be used for the same purpose as well but will a little bit more settings.
● 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
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
Hi!
I'm trying to delete a particular word from my music tags but when I use the "All Text Fields" option, it doesn't search all text fields.
I did: Find What: PMEDIA, Into: All Text Fields, Replace with: Blank
In the example below I numbered all the empty fields in the MM tag 1-13:
Up All Night;Khalid;Hot R&B.Hip-Hop Songs 2019.11.30;Billboard;Pop; R&B; Soul; Alternative; American; Electronic;1;2;4;6;;;;;E:\_MUSIC\_MM Music Directory\Billboard\Hot R&B.Hip-Hop Songs 2019.11.30\89 - Khalid - Up All Night.mp3;7;8;5;Energy 6;4B;;;;;
The fields that aren't searched are:
3- Original date
9- Original lyricist
10- ISRC
11- Publisher
12- Encoder
13- Copyright
How do I get these missing fields to be searched and the word (PMEDIA) replaced?
Thank you!
I'm trying to delete a particular word from my music tags but when I use the "All Text Fields" option, it doesn't search all text fields.
I did: Find What: PMEDIA, Into: All Text Fields, Replace with: Blank
In the example below I numbered all the empty fields in the MM tag 1-13:
Up All Night;Khalid;Hot R&B.Hip-Hop Songs 2019.11.30;Billboard;Pop; R&B; Soul; Alternative; American; Electronic;1;2;4;6;;;;;E:\_MUSIC\_MM Music Directory\Billboard\Hot R&B.Hip-Hop Songs 2019.11.30\89 - Khalid - Up All Night.mp3;7;8;5;Energy 6;4B;;;;;
The fields that aren't searched are:
3- Original date
9- Original lyricist
10- ISRC
11- Publisher
12- Encoder
13- Copyright
How do I get these missing fields to be searched and the word (PMEDIA) replaced?
Thank you!
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
Here is the excerpt from the Usage section:
"the first item in the Into list (All Text Fields) is specific and it allows modification of several textual fields at once using the same replacement. You could specify which text fields you want to modify using settings in the Search sheet of the Options dialog box"
If you find that the All Text Fields option is not working with the fields that are checked on the mentioned setting , that would be a bug. By the way, be very careful not to have checked on Path with that option.
"the first item in the Into list (All Text Fields) is specific and it allows modification of several textual fields at once using the same replacement. You could specify which text fields you want to modify using settings in the Search sheet of the Options dialog box"
If you find that the All Text Fields option is not working with the fields that are checked on the mentioned setting , that would be a bug. By the way, be very careful not to have checked on Path with that option.
● 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
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
What preset are you referring to? I thought this would be simple so I made up my own preset but if there's already one I'd like to use that.ZvezdanD wrote: ↑Sat Apr 30, 2022 12:33 pm Here is the excerpt from the Usage section:
"the first item in the Into list (All Text Fields) is specific and it allows modification of several textual fields at once using the same replacement. You could specify which text fields you want to modify using settings in the Search sheet of the Options dialog box"
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
I didn't refer any preset. You reported that the mentioned option "doesn't search all text fields" and I just quoted the part of the Usage section from the web page of the add-on that explains how to specify which fields would be included for the replacement.
You should check out the mentioned Search page in the Options dialog box to verify if the "fields that aren't searched" are selected or not.
You should check out the mentioned Search page in the Options dialog box to verify if the "fields that aren't searched" are selected or not.
● 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
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
Is the Search page where all the presets are at? If not I'm not sure how to get to it.Search page in the Options dialog box
I don't see anything referred to as a Search page and all I see for Options doesn't deal with preset modifications.
Could you walk me through it please.
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
@Kluv
MM's
Tools > Options > Library > Search
That determines the execution of 'All Text Fields' in the addon.
...but you should not set/or be highly cautious of setting the path field here for use
with 'All Text Fields" (might cause serious problems), rather you could use the
replace preset for path separately.
MM's
Tools > Options > Library > Search
That determines the execution of 'All Text Fields' in the addon.
...but you should not set/or be highly cautious of setting the path field here for use
with 'All Text Fields" (might cause serious problems), rather you could use the
replace preset for path separately.
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"
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"
Regexp 4.3 - preset #207 not working for me
Until there is a version of Regexp for MM5, I am using it with MM4. Preset #207 is the only one that I found that will capture the name of the last folder. It isn't working for me.
I tried to understand the 'expression' language so I could figure out what went wrong, but I don't get it.
Can anyone tell me perhaps what I need to change?
RegExp(RegExpEx(oSongData.Path, "\\([^\\]+)\\([^\\]+)\.([^\.\\]+)$", 0, 0), "^([^-]*)(?=\s-\s.*)", 0)
TY,
Michael
I tried to understand the 'expression' language so I could figure out what went wrong, but I don't get it.
Can anyone tell me perhaps what I need to change?
RegExp(RegExpEx(oSongData.Path, "\\([^\\]+)\\([^\\]+)\.([^\.\\]+)$", 0, 0), "^([^-]*)(?=\s-\s.*)", 0)
TY,
Michael
Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]
Yes, I am replying to myself.
I don't understand this language, but nonetheless, I went to a webpage that showed a script for capturing the last folder of a path. I screwed around with the code and made this work - at least, it's doing what I wanted to do. I wanted to simply capture the name of the last folder so I could place it in a tag.
Here it is: RegExp(oSongData.Path, "[^\\]+(?=\\[^\\]+\\?$)", 0)
I believe that that preset #207 was supposed to extract part of the folder name. That's not what I wanted and that's not what my script does. Select "VBScript expression" in Regexp when you use this.
This is what it does:
C:\Music\Artist\AlbumName\song.mp3 ==> AlbumName may be used for any of many tags.
- Michael
I don't understand this language, but nonetheless, I went to a webpage that showed a script for capturing the last folder of a path. I screwed around with the code and made this work - at least, it's doing what I wanted to do. I wanted to simply capture the name of the last folder so I could place it in a tag.
Here it is: RegExp(oSongData.Path, "[^\\]+(?=\\[^\\]+\\?$)", 0)
I believe that that preset #207 was supposed to extract part of the folder name. That's not what I wanted and that's not what my script does. Select "VBScript expression" in Regexp when you use this.
This is what it does:
C:\Music\Artist\AlbumName\song.mp3 ==> AlbumName may be used for any of many tags.
- Michael