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 kluv » Fri Apr 28, 2017 7:54 pm

It worked like a dream. Thank you for your help!!

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

Post by ZvezdanD » Fri Apr 28, 2017 3:07 pm

kluv wrote:Would it have been sent in an email?

How else would I sent you updates? ;)

The last one was sent on 2017-03-15, please check your Spam folder and if it is there put my e-mail address on your contact list to prevent such things in the future.

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

Post by kluv » Fri Apr 28, 2017 2:55 pm

ZvezdanD wrote:Didn't you get the newer versions by me? It is important that you use the latest version.


Would it have been sent in an email?

What do I need to do to get it?

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

Post by ZvezdanD » Fri Apr 28, 2017 1:26 am

kluv wrote:I have version 5.0.0.6.1

Didn't you get the newer versions by me? It is important that you use the latest version.

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

Post by kluv » Thu Apr 27, 2017 5:25 pm

ZvezdanD wrote:Which version build do you have?

I have version 5.0.0.6.1



ZvezdanD wrote:- Opening string: -
- Closing string: empty
- Remove opening string: checked
- Insert position: -6
- Prefix: empty
- Suffix: -


After changing the code to what you have below I went to Tune and changed the values you mentioned. Nothing happened. I then checked the "Use RegEx to specify strings" and got this: Hear That First 12-$3$3-31-16. Not sure where I went wrong at.

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

Post by MMFrLife » Thu Apr 27, 2017 8:33 am

Thanks for fixing :)

Actually, a while back I noticed what I guessed to be a bug in more than one rightmost preset where they would only work if you counted from the left.
Not sure if those are ones you are referring to. I meant to report but forgot about the issue. I will have to look for it again later to confirm what they are.

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

Post by ZvezdanD » Thu Apr 27, 2017 2:56 am

kluv wrote:I do have the expanded version

Which version build do you have?

kluv wrote:if you would list the 5 presets I need I can start putting them together.

Actually, it should not be a need for a batch. The presets from the "Move field parts" menu are intended for such requests. The "Move rightmost part of <Into Field> between (and including) specified strings to +/- specified character position" could be used in your case with the following settings:
- Opening string: -
- Closing string: empty
- Remove opening string: checked
- Insert position: -6
- Prefix: empty
- Suffix: -

However, that preset and several another "rightmost" ones have a bug when the Closing string is empty. Here is the fixed Replace with string for this preset:
Code: Select all
RegSub(RegSub("$&", SetVar(0, "^(.*)(<If Caption="Use RegEx to specify strings" Value=0 ID=1><Else>" & RegSub("<End If><String Caption="Opening string" Value=" ("><If ID:1><Else>", "[$^*()+[\]\\{}|.?]", "\$$&") & "<End If>)(.*)(<If ID:1><Else>" & RegSub("<End If><String Caption="Closing string" Value=")"><If ID:1><Else>", "[$^*()+[\]\\{}|.?]", "\$$&") & "<End If>)"), "$1<If Caption="Remove opening string" Value="1"><Else>$2<End If><If Caption="Remove closing string" Value="1"><Else>$4<End If>"), IIf(<Number Caption="Insert position" Value="-1" MinValue="-100" ID:-1> >= 0, "^.{" & <ID:-1> - 1 & "}", ".{" & -<ID:-1> - 1 & "}$"), IIf(<ID:-1> >= 0, "$$&", "") & IIf(SetVar(1, Len(RegSub("$&", GetVar(0) & ".*|.*", "$2$3$4"))), "<String Caption="Prefix" Value=" [">", "") & RegSub("$&", GetVar(0) & ".*|.*", "<If Caption="Insert opening string" Value="0">$2<End If>$3<If Caption="Insert closing string" Value="0">$4<End If>") & IIf(GetVar(1), "<String Caption="Suffix" Value="] ">", "") & IIf(<ID:-1> < 0, "$$&", ""))


Thanks for bringing this into the light, so I could find that bug.

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

Post by kluv » Thu Apr 27, 2017 2:08 am

Thanks for getting back with me MMFrLife. I do have the expanded version so if you would list the 5 presets I need I can start putting them together.

Thanks again.

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

Post by MMFrLife » Wed Apr 26, 2017 2:05 pm

After glancing over a few presets, It seems to be possible but not easy.
You'll need the donate/expanded version and you'd have to batch together around 5 presets.

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

Post by kluv » Tue Apr 25, 2017 2:43 pm

Hi all, hope you are doing well.

Is there a preset or way to switch Album name from Hear that first MM-DD-YY to Hear that first YY-MM-DD?

Thank you for whatever help you can provide.

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

Post by ZvezdanD » Sat Apr 22, 2017 3:12 pm

You could try Track Redirection & Synchronization add-on if you have the same folder structure between FLACs and MP3s or the same Artists and Titles:
- open Tools | Track Redirection | Options dialog box;
- set fields/tags which you want to synchronize;
- click OK to confirm new settings;
- choose Tools | Track Redirection | Create Redirections/Copy Metadata option;
- choose Duplicates if you have FLAC/MP3 tracks with the same Artists and Titles or choose Folders if they have the same folder structure;
- if you tick Folders on, then set the base folder of MP3 files in the Master text box and the base folder of FLAC files in the Copy text box;
- check on tracks that you want to synchronize in the track list (they are all checked on by default);
- click the Synchronize button.

Transpose values between files, but in sequence...

Post by davidbspalding » Sat Apr 22, 2017 1:45 pm

Not sure this can be automated in MM or with this plug-in, but I thought I'd try asking.

I'm recreating new rips of old CDs in FLAC, where previously I had MP3s. The MP3s had individual tags in files, e.g. COMPOSER strings that varied from one file to another in single ALBUMS, e.g. compilations or collaborative works.

Problem? I don't want to copy and paste from each track's file to the track's new file, one by one. I'd like to transpose the COMPOSER tag from track 1 (mp3) to track 1 (FLAC), the COMPOSER tag from track 2 to track 2, etc. Anyway this can be done within MM?

Image

Postscript: Oh I found a slightly faster workaround.

1. Select tracks with the same COMPOSER tag.
2. Select tracks with NO composer tag that you want populated.
3. SHIFT + ENTER or right-click and select properties.
4. Select the checkbox next to COMPOSER field; save/enter.
5. The COMPOSER tag is synced to the files that had empty composer fields.

Still a manual process, though. Doesn't scale if you're managing 100+ files.

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

Post by ZvezdanD » Thu Mar 23, 2017 5:53 am

v5.x Preset: Assign merged Comment from all tracks on Album to <Into Field>...
Description: If Separator is "; ", track#1 has Comment="String1", track#2 has Comment="String2" and track#3 has Comment="String3" -> destination field for all tracks="String1; String2; String3"
Find what: ^.*
RegExp1: checked
Replace with: SQLQuery("SELECT group_concat(F1, '<String Caption="Separator" Value="; " ID=1>') FROM (SELECT DISTINCT Comment AS F1 FROM Songs AS S1 WHERE IDAlbum = " & oSongData.Album.ID & " AND Comment <> '' AND InStr('<ID:1>' || (SELECT group_concat(F2, '<ID:1>') FROM (SELECT DISTINCT Comment AS F2 FROM Songs AS S2 WHERE IDAlbum = " & oSongData.Album.ID & " AND Comment <> '' AND S1.ID <> S2.ID)) || '<ID:1>', '<ID:1>' || Comment || '<ID:1>') = 0 ORDER BY CAST(DiscNumber AS int), CAST(TrackNumber AS int))")
VBScript: checked

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

Post by ZvezdanD » Mon Mar 20, 2017 4:15 am

Preset: Replace LF with CR+LF in Lyrics
Description: A new line is represented as Line Feed character in Unix, but as Carriage Return + Line Feed characters in Windows.
Find what: (?:\r)?\n
Into: Lyrics
RegExp1: checked
Replace with: vbCrLf
VBScript: checked

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

Post by ZvezdanD » Sun Feb 26, 2017 12:32 pm

MMFrLife wrote:However, I would "ideally" like the possibility of maybe another letter or two, but I can do without
if that is a problem (like, maybe problematic if other letter is "A" ([2A], [3A], [23A]...), since it is
already in lowercase section. What happens if "A" is at beginning of title/name or after a digit "within" title or name;
counter-instructing problem again(?))

You could add "\d+[AD]" to the Uppercase section instead, adding whatever character you want to be after digits inside of these [] brackets. The Uppercase section matches only words since it is surrounded by \b anchors. So, if you specify "\d+[AD]" it will match 2A, 2D, 23A, 312D... It will match them anywhere in the field if they are surrounded by any non-word character, e.g. " 2A " or " 2A, " or "[2A]" or "(2A)"... It will not match 2AA because it has two A. If you want to match one or more characters, you should write "\d+[AD]+".

MMFrLife wrote:I would say no. They are minor breaks. Merely pauses (one quick and one slightly extended). They don't have the same prominence as
separators like "-", ":", "(", etc.

You are right. Here is the new update for the begin of Lowercase section "[\-:.!?][ \t]*|[ \t]+".

Top