IPB

Welcome Guest ( Log In | Register )

> Notice!

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.

 
Reply to this topicStart new topic
> delete trailing characters from tag (regex help)
digraph
post Oct 26 2007, 15:34
Post #1


Member


Group: Members
Posts: 3
Joined: 26-October 07
Member No.: 5827
Mp3tag Version: 2.39



I know this is super simple for most of you, but I'm having trouble.

My BPM tags are written in xxx.xx format, with two decimal place precision.
However, itunes mac chokes on this (windows does not, go figure).

Anyway, since all BPM data is either: xx.xx or xxx.xx I'd like to simple remove the last three characters.

Simple, huh?

Extra points for rounding the integer part up or down.

thanks!!
Go to the top of the page
 
+Quote Post
digraph
post Oct 26 2007, 15:56
Post #2


Member


Group: Members
Posts: 3
Joined: 26-October 07
Member No.: 5827
Mp3tag Version: 2.39



How about that, I solved my own question

you match it with this:

\.[0-9]+

anyway, thanks for the great program!
Go to the top of the page
 
+Quote Post
DetlevD
post Oct 26 2007, 16:09
Post #3


Member


Group: Full Members
Posts: 1984
Joined: 26-May 06
From: Wuppertal, Germany
Member No.: 3194
Mp3tag Version: 2.46b



QUOTE (digraph @ Oct 26 2007, 16:34) *
... My BPM tags are written in xxx.xx format, with two decimal place precision. ... I'd like to simple remove the last three characters. ... Extra points for rounding the integer part up or down. thanks!!


First look here:
http://forums.mp3tag.de/index.php?s=&a...ost&p=21003


Round BPM to integer.mta

Action #1:
Action type: Format value
Field: BPM_MIXMEISTER
Formatstring: $if2(%BPM_MIXMEISTER%,%BPM%)

Action #2:
Action type: Format value
Field: BPM
Formatstring: $left($replace(%BPM%,.,)00,$add($len($div(%BPM%,1)),2))

Action #3:
Action type: Format value
Field: BPM
Formatstring: $ifgreater($mod(%BPM%,100),44,$add($div(%BPM%,100),1),$div(%BPM%,100))

DD.20071026.1710.CEST


--------------------
home is where the heart is
Go to the top of the page
 
+Quote Post
digraph
post Oct 26 2007, 17:51
Post #4


Member


Group: Members
Posts: 3
Joined: 26-October 07
Member No.: 5827
Mp3tag Version: 2.39



This is excellent! Thank you for the help smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 4th September 2010 - 01:07