You have a typo in your regex - a missing escape for ']'. I also replaced ? with * at the end to catch multiple parenthesis groups:
Regex([Album], /#^(.+?)((\s*\[[^\]]*\])|(\s*\([^)]*\)))*$#/, 1)
Note that this is more or less the same as:
Trim(Regex([Album], /#([^(\[]*)#/,1))
You can use Zelda (https://yabb.jriver.com/interact/index.php/topic,125975.0.html) to test these expressions.
You have a typo in your regex - a missing escape for ']'. I also replaced ? with * at the end to catch multiple parenthesis groups:
Regex([Album], /#^(.+?)((\s*\[[^\]]*\])|(\s*\([^)]*\)))*$#/, 1)
Note that this is more or less the same as:
Trim(Regex([Album], /#([^(\[]*)#/,1))
You can use Zelda (https://yabb.jriver.com/interact/index.php/topic,125975.0.html) to test these expressions.
Thanks!!
first thing I did when it didnt work is download the latest Zelda :P. What I couldnt figure out was how to let it show album titles, I could only get it to show tracks.
You have a typo in your regex - a missing escape for ']'. I also replaced ? with * at the end to catch multiple parenthesis groups:
Regex([Album], /#^(.+?)((\s*\[[^\]]*\])|(\s*\([^)]*\)))*$#/, 1)
Note that this is more or less the same as:
Trim(Regex([Album], /#([^(\[]*)#/,1))
I modified the [MyRegexTest] calculated field I created for the purpose of participating in this thread to use these revised regex expressions. Neither of them made any difference to the results I get. My album named Greatest Hits (2011 digital remaster) still generates a MyRegexTest value of Greatest Hits (2011 digital remaster) by Queen. I had expected a result of Greatest Hits, i.e. with the bracketed suffix removed and no reference to the artist.
Have I misunderstood the purpose of these regex expressions?