INTERACT FORUM
More => Old Versions => JRiver Media Center 18 for Windows => Topic started by: kstuart on February 25, 2013, 12:03:49 pm
-
Can you use expressions in Find And Replace (for Fields) ?
In other words, "If exist blah blah, then replace [Description] with [Album]" and similar.
I'm basically looking for functionality similar to both Find And Replace, and Move/Copy Fields, but with a) only portions of the fields, and b) depending on certain conditions.
-
Nope.
-
Okay, so those are both as they appear.
So, is there a way to do the following:
If [Album] contains either a [ or a (
Then move that character - and everything after it - to [Description]
For example,
Album Dark Side of the Moon [30th Anniversary Remaster]
becomes
Album Dark Side of the Moon
Description 30th Anniversary Remaster
(I've previously seen it explained how to make a View based on these conditions, but not how to actually move the tag information based on these conditions.)
-
Set Description first with:
=Regex([album], /#^(.+?)(?:\s*\[(.+)\])?$#/, 2)
and then followup by changing Album with:
=Regex([album], /#^(.+?)(?:\s*\[(.+)\])?$#/, 1)
Both are the same expression, with just the capture value changed. You can setup two expression columns to see that it works.
-
I think there is a problem with the Tag Window editing style for "Description" Tag.
No matter what I do, the "Description" stays as - literally :
=Regex([album], /#^(.+?)(?:\s*\[(.+)\])?$#/, 2)
Unlike other tag editing, Description puts "Enter" into the string as a carriage return, so there seems no way to cause the expression to "execute".
-
After you enter the expression, just close the box and it will evaluate.
-
Aha - I had a space at the beginning. It does calculate when you close the box.
So far so good, it is definitely helpful.
What would be ideal would be an expression that:
* Started on the left end (IIRC smallest numbered character ?)
* When it encountered either a " [ " or " ( " or " { "
* Put everything else to the right, into Description - even if there are more of those characters
For example, I might have something like:
Dark Side of the Moon (2003 remaster) [FLAC] {Doug Sax mastering}
and want everything after the first parenthesis to be in Description.
the cleaned up result that you provided previously (in other words, with brackets removed) is great, but not strictly necessary if multiple ones causes it to be too complicated.
Thanks !
-
Use the following:
=RemoveCharacters(Regex([album], /#^(.+?)(?:\s*[[({](.+)[\])}])?$#/, 1),/(/)[]{})
same as before 1 for Album, 2 for Description.
-
Works perfectly ! :o :o
I hope some other readers have a use for this !
-
MrC and his wonderful toys (http://www.youtube.com/watch?v=KA5II5AlO7w) again. ;)
-
Apparently I've always been mesmerized with and bewildered by toys.
(http://i1200.photobucket.com/albums/bb336/Mr__C/MC%20Screenies/michael-phone1_zpscc370009.jpg)