INTERACT FORUM
More => Old Versions => JRiver Media Center 27 for Windows => Topic started by: MarkCoutinho on August 09, 2021, 02:31:28 am
-
Hi everyone,
I'm trying to make a link in MC to search for songfacts about a song. I'm getting pretty close with this:
https:////www.songfacts.com//facts//regex([Artist]//[Name], /#^(.+?)(?: [[(]extended\b[^)\]]*[)\]])?$#/, 1)
(I don't want the query to contain 'extended version' - hence the exclusion of that word)
However the output is this: https://www.songfacts.com/facts/middle%20of%20the%20road/soley%20soley/
And it should be: https://www.songfacts.com/facts/middle-of-the-road/soley-soley/
Could someone tell me what to do to replace the spaces between the words by the - sign?
Thanks!
-
Just add a Replace():
https:////www.songfacts.com//facts//replace(regex([Artist]//[Name], /#^(.+?)(?: [[(]extended\b[^)\]]*[)\]])?$#/, 1),/ ,-)
This may work better with a simpler Regex that cuts anything after a parenthesis/bracket:
https:////www.songfacts.com//facts//replace(regex([Artist]//[Name], /#^(.+?)(\s?[\[(].*)?$#/, 1),/ ,-)
-
Spot on!
Thank you very much!