INTERACT FORUM
More => Old Versions => JRiver Media Center 30 for Windows => Topic started by: mvandyke on October 29, 2022, 11:17:19 am
-
I've worked with expressions (to some degree) and have completed some work but not getting exactly what I'm trying to complete.
I'm trying to extract data between • • that meet contains a specific string.
For example I would like to extract data that contains the variable "2003" but no other data for a field (Album Awards) that contains:
Q Magazine: 20 Loudest Albums of All Time (17) • Rolling Stone: 500 Greatest Albums of All Time: 2003 edition (15) • Rolling Stone: 500 Greatest Albums of All Time: 2012 edition (15) • Rolling Stone: 500 Greatest Albums of All Time: 2020 edition (30) • The Guardian 100 Best Albums Ever (30) • Uncut: The 100 Greatest Debut Albums (2006) (3)
I would like the expression to display "Rolling Stone: 500 Greatest Albums of All Time: 2003 edition (15)" but nothing else, so that I can then copy that text string to another field (RS Top 500 Albums 2003)
Any assistance would be appreciated. I'm sure that it's a regex command but not having any luck (that one seems to be more difficult for me).
Thanks
Matt
-
Split on the dots to create a list, filter for items containing '2003', return only the first of those items:
listitem(listgrep(replace([Album Awards],•,;),2003,0),0)
If it's not always 2003 then it needs some changes.
-
It worked perfectly.
Thanks so much!!!! Your expertise saved me much time of guessing and experimenting!
Matt
-
ZYBex is becoming the new defacto master of MC Expressions...
Nice job. :)
Brian.
-
What do you mean "becoming" ? ;D