Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.
Also make sure you've read the Forum Guidelines before posting in this forum.
![]() ![]() |
Aug 1 2011, 05:03
Post
#46
|
|
![]() Member Group: Full Members Posts: 4129 Joined: 26-May 06 From: Wuppertal, Germany, Planet Earth Member No.: 3194 Mp3tag Version: 2.54 |
Convert from RFC822/1123 Date string to ISO-8601 Date string.
Examples: RFC822/RFC 1123 ==> ISO-8601 1 Feb 2009 ==> 2009-02-01 30 Sep 2010 ==> 2010-09-30 $replace($regexp($right('0'%YEAR%,11),'(\d{1,2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{2,4})','$3-$2-$1'),'Jan','01','Feb','02','Mar','03','Apr','04','May','05','Jun','06','Jul','07','Aug','08','Sep','09','Oct','10','Nov','11','Dec','12') See also: http://www.w3.org/Protocols/rfc822/ http://www.freesoft.org/CIE/RFC/1123/99.htm DD.20110801.0623.CEST This post has been edited by DetlevD: Aug 1 2011, 05:20 -------------------- * Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥ |
|
|
|
Aug 24 2011, 15:55
Post
#47
|
|
![]() Member Group: Full Members Posts: 4129 Joined: 26-May 06 From: Wuppertal, Germany, Planet Earth Member No.: 3194 Mp3tag Version: 2.54 |
How to copy a list of artists and their roles ...
... from tag-field COMMENT ... to tag-field INVOLVEDPEOPLE Example 1 From: COMMENT Person1:Role1 Person2:Role2 Person3:Role3 To: INVOLVEDPEOPLE Role1:Person1;Role2:Person2;Role3:Person3; Action: Format value Field: INVOLVEDPEOPLE Formatstring: $regexp(%COMMENT%$char(13),'(.+?):(.+?)[\r\n]+','$2:$1;') Example 2 From: COMMENT Person1:Role1 Person2: Role2a,Role2b Person3 : Role3a, Role3b Person4: Role4a & Role4b, Role4c To: INVOLVEDPEOPLE Role1:Person1;Role2a,Role2b:Person2;Role3a,Role3b:Person3;Role4a & Role4b,Role4c:Person4; Action: Format value Field: INVOLVEDPEOPLE Formatstring: $regexp($regexp(%COMMENT%$char(13),'(.+?)\s*:\s*(.+?)[\r\n]+','$2:$1;'),'\s*,\s*',',') DD.20110824.1757.CEST This post has been edited by DetlevD: Aug 24 2011, 16:55 -------------------- * Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥ |
|
|
|
Aug 24 2011, 16:29
Post
#48
|
|
![]() Member Group: Full Members Posts: 1571 Joined: 15-March 09 From: Germany Member No.: 9103 Mp3tag Version: 2.50 |
|
|
|
|
Aug 24 2011, 16:48
Post
#49
|
|
![]() Member Group: Full Members Posts: 4129 Joined: 26-May 06 From: Wuppertal, Germany, Planet Earth Member No.: 3194 Mp3tag Version: 2.54 |
What is $char(13) ? And why is it needed here? $char(13) is the "CarriageReturn" control character. It is appended here on the fly to the COMMENT string as a helper, just to make sure, that there is at least one "CarriageReturn" character at the end of the COMMENT string, in order to let the RegExp work correctly, even for the case, when the original COMMENT string has no trailing CarriageReturn/LineFeed sequence. DD.20110824.1750.CEST -------------------- * Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥ |
|
|
|
Feb 8 2013, 00:55
Post
#50
|
|
|
Member Group: Members Posts: 1 Joined: 18-December 07 Member No.: 6138 Mp3tag Version: 2.39 |
If you want to add TEXT to the existing tag:
Regular expression: (.*) Replace with: TEXT \1 \0 I found that if you don't put in the \0 at the end it will repeat TEXT twice. For example: Title: Texty text Becomes: TEXT Texty textTEXT I'm using v2.48. This might of been fixed in the later versions, but it's the version I've been using and some things I refuse to update to a newer version since I've never had any other issues with it except for this one bit of annoyance. |
|
|
|
Apr 5 2013, 10:41
Post
#51
|
|
|
Member Group: Full Members Posts: 15 Joined: 18-November 04 Member No.: 1325 Mp3tag Version: 2.26 |
Regular expression: (.*) Replace with: TEXT \1 \0 I found that if you don't put in the \0 at the end it will repeat TEXT twice. For example: Title: Texty text Becomes: TEXT Texty textTEXT What seems to be happening is the "end of line" is being matched a second time for some reason. Using 2.48, I duplicated your bug but also tweaked the RegEx to work properly. Regular expression: ^(.*)$ Replace with: TEXT $1 That explicitly tells the engine not to include the newline in the match. |
|
|
|
Apr 5 2013, 13:39
Post
#52
|
|
![]() Moderator Group: Moderators Posts: 5507 Joined: 4-September 03 From: Germany Member No.: 201 Mp3tag Version: 2.55a |
It's not a bug.
It happens because global matching is activated by default. That means the engine tries to match the regex pattern as many times as possible. With (.*) the whole text is matched at first. Then the engine stands at the end of the text. And it tries to match the pattern again. And it succeeds because .* also matches "nothing". But I'd prefer a simple "Format value" action is for this task anyway. -------------------- |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 25th May 2013 - 21:37 |