INTERACT FORUM

More => Old Versions => Media Center 16 (Development Ended) => Topic started by: chrisjj on May 24, 2011, 06:37:46 am

Title: What expression extracts GTIN/EAN/UPC from Album title?
Post by: chrisjj on May 24, 2011, 06:37:46 am
Is there an expert who can tell me an expression to extract GTIN/EAN/UPC from Album title? e.g.

Album: Bailando tangos, valses y milongas [00724359515922]
GTIN/EAN/UPC: 00724359515922

Thanks.
Title: Re: What expression extracts GTIN/EAN/UPC from Album title?
Post by: mark_h on May 24, 2011, 07:36:45 am
=listitem([album],1,/[)

Should give you the data along with a trailing ] which could be cleaned up.

=replace(listitem([name],1,/,),/[,)

Haven't tried it though...
Title: Re: What expression extracts GTIN/EAN/UPC from Album title?
Post by: chrisjj on May 24, 2011, 08:38:37 am
=replace(listitem([name],1,/,),/[,)
Thanks Mark.

Amended to replace(listitem([Album],1,/[,),/],) it succeeds... except where there's e.g. [Disc 1 of 2] or anything after the GTIN/EAN/UPC.

I'd like a specific match. Does MC support any kind of regexp in expressions?

Title: Re: What expression extracts GTIN/EAN/UPC from Album title?
Post by: Vincent Kars on May 24, 2011, 09:44:36 am
Here you can find all the functions: http://wiki.jriver.com/index.php/Media_Center_expression_language
Unfortunately there isn’t a ‘find’ function so the ListItem is the only one to break down a string.
If you want to use regexp have a look at MP3Tag
Title: Re: What expression extracts GTIN/EAN/UPC from Album title?
Post by: chrisjj on May 24, 2011, 10:16:15 am
Unfortunately there isn’t a ‘find’ function so the ListItem is the only one to break down a string.
Thanks.
Title: Re: What expression extracts GTIN/EAN/UPC from Album title?
Post by: chrisjj on February 04, 2013, 07:23:23 pm
Does MC support any kind of regexp in expressions?

Since added - found in M18. http://wiki.jriver.com/index.php/Media_Center_expression_language#Regex.28....29:_Regular_expression_pattern_matching_and_capture .

Excellent! Thanks, Devs.