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

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 »

husker wrote:but the MediaMonkey search feature does not seem to be case sensitive.
That is a Windows issue not MM's.
I don't have MM in front of me right now, will look into an idea later unless someone else comes around.
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 »

I just tested the Preset I gave you and it seems to work.
In what way is it not working? Does it mess with other words in the title/filename to your disliking?

Can you copy and paste the exact wording of a title(s) that you want changed 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"
😜
husker
Posts: 28
Joined: Wed Dec 30, 2015 2:53 pm

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

Post by husker »

Sure -
02 - Symphony No. 33 In B flat major, KV319 - Ii. Andante moderato

I have 22,000 files or so that would need to be checked. I would actually be more interested in just finding them to begin with.
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 »

Finding them won't be easy but you can try:

1. Go to Tools > Options > Library > search > uncheck everything but title and path > check "match whole words" at bottom.
2. Go over to the tree > Select > classical
3. Go to search scope drop-down arrow next to simple search field > choose classical.

This is the tedious part,
4. start by typing into simple search wherever you want to start in the sequence of roman numerals, for example, type [path:"i."] (with quotes, but not brackets.
be careful not to put a space after colon)
5. if you find a select group you want, try the other Capitalize preset that doesn't say exceptions.

If it is a big I or a little i, it should bring back results for both which could get tedious, but is better than going in without any particular strategy.
You might have to alternate between the two presets to get a desired result depending on the variation in roman numeral format.
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"
😜
husker
Posts: 28
Joined: Wed Dec 30, 2015 2:53 pm

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

Post by husker »

Thank you. I had been working in a similar manual function over the past few weeks. I was just hoping there would be an automated way.

Thank you for taking the time.
ZvezdanD
Posts: 3270
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

This preset could find any roman numerals from 1 to 89 followed by dot, uppercase or lowercase:
Find what: \b[ivxl]+\.
Regular expression (F.): checked
Match case: unchecked
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
Camus II

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

Post by Camus II »

I have 22,000 files or so that would need to be checked. I would actually be more interested in just finding them to begin with.
The following Magic Node should isolate the tracks if genre is tagged as Classical. You'll find it as the first node under Magic Nodes in the tree:

Code: Select all

Tracks with Roman Numerals in Classical Title|Icon:3|Filter:<Genre> = 'Classical' AND (InStr(<Title>, 'I. ') > 0 OR InStr(<Title>, 'V. ') > 0 OR InStr(<Title>, 'X. ') > 0 OR InStr(<Title>, 'i. ') > 0 OR InStr(<Title>, 'v. ') > 0 OR InStr(<Title>, 'x. ') > 0)|Position:First child\<Genre>\<Album>
And following on from ZvezdanD's lead, the following regexp should convert the numerals as wanted. Make sure to test and use gradually for safety:

==============

Title: Roman Numerals (1 - 39) as Mvt. No. in Classical Title field - Ucase 1st, Lcase rest.

Description: Capitalise first Roman Numeral only eg XIV. => Xiv.

Find What: \b([IVX])([IVX]+)?(\.)

Into: Title

Regular expression 1: checked

Replace with: UCase("$1") & LCase("$2") & "$3"

<<: Title

VBScript expression: checked

==============
sordup
Posts: 126
Joined: Sat Mar 13, 2010 5:16 am

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

Post by sordup »

Hiya,
Forgive the possibly newbie-ish question. I am a longtime user of MM and occasional user of Find and Replace but not often enough to know my regular expression syntax well. I want to modify the " Copy <From Field> to <Into Field>... ", or another more suitable one.

I am looking to copy a specific portion of a field, of only X characters in length, into another field, replacing whatever, if any, string was there before.

Specifically, I have many folders categorizing albums/tracks by Date. The date, in its 4-character year form, is conveniently at the beginning of every folder name. I wish to copy these first 4 characters into the Date or Original Date field of each of their respective tracks.

Thanks
quietroom
Posts: 7
Joined: Thu May 12, 2016 4:59 am

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

Post by quietroom »

Hi, Can anyone help me I have a field in properties called "Encoded By" which I need to clean / clear any help I would be gratefull
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 »

quietroom wrote:Hi, Can anyone help me I have a field in properties called "Encoded By" which I need to clean / clear any help I would be gratefull
If you are using RFR, use "Clear <Into Field>" preset
Go to into field drop down menu and choose the field that has that string in it.

Otherwise, if you are just doing a simple clear, it's easier to use properties.
Last edited by MMFrLife on Sat May 14, 2016 9:11 am, 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"
😜
quietroom
Posts: 7
Joined: Thu May 12, 2016 4:59 am

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

Post by quietroom »

Thank you for the quick reply MMFrLife but there is no field in RFR called "Encoded By" or is there a field in properties showing this. So I still need help to cure this problem. Once again MMFrLife thanks for your help.
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 »

quietroom wrote:but there is no field in RFR called "Encoded By" or is there a field in properties showing this.
There is no field that is natively named "Encoded by". The only way this would occur is if you name a custom field by that name.
Otherwise, you would just have the words "Encoded by" contained in a field by another name, like Encoder, Grouping or any other.
That string is often filled into the Encoder field by programs used to rip discs.

Can you you describe in greater detail what you are seeing, please?
I need the name of the field and what's in it.
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"
😜
quietroom
Posts: 7
Joined: Thu May 12, 2016 4:59 am

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

Post by quietroom »

Hi MMFrLife thanks for your time the field is called Encoded By and contains Flac or similar ripping information or itunes stuff I will try to show you an image of it.
Image
I hope this gives you some idea and once again thanks Regards Quietroom
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 »

What file format (DRM?)?
Does the info in the field show up in any of the fields in MM (check through all the tabs in MM properties)?
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"
😜
sordup
Posts: 126
Joined: Sat Mar 13, 2010 5:16 am

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

Post by sordup »

No ideas on how to achieve this??...
sordup wrote:Hiya,
Forgive the possibly newbie-ish question. I am a longtime user of MM and occasional user of Find and Replace but not often enough to know my regular expression syntax well. I want to modify the " Copy <From Field> to <Into Field>... ", or another more suitable one.

I am looking to copy a specific portion of a field, of only X characters in length, into another field, replacing whatever, if any, string was there before.

Specifically, I have many folders categorizing albums/tracks by Date. The date, in its 4-character year form, is conveniently at the beginning of every folder name. I wish to copy these first 4 characters into the Date or Original Date field of each of their respective tracks.

Thanks
Post Reply