Thank you very much for your help, @theta_wave and for your commitment with the community.
No problem, I'm no expert at this kind of thing, but I try to do what I can to help. I'm here to learn as well. For example, I'm wondering about your use of
[\s:,]*. To me, read left to right, it looks inconsequential because of the use of the "*" rather than "+" since "*" would still select a character even in the absence of the whitespace, colon or comma at that location.
I have some difficulty in understanding the workings and/or syntax of RxSplit.
Suppose a title being:
Misa criolla: Credo
If I use:
$RxSplit(<Title>,"(: )",1)
To get the complete contents before the colon that works.
(displaying: Misa criolla)
But if I try the same to get the contents after the colon this won't work:
$RxSplit(<Title>,"(: )",2)
(it will only display ":")
Only if I add some arguments it will work:
$RxSplit(<Title>,"(: .*)",2)
Why doesn't the first example need more arguments, and why does the second?
Edit:
A second question came up:
Using the same track title as above (Misa criolla: Credo), and trying to isolate the 'work (before the colon) using this:
$RxReplace(<Title>,"(^.+?)\:\s","$1")
I would expect it to only show the work, but it will display:
MisacriollaCredo
So it doesn't stop at running into \:\s
Shouldn't it?
1) For the first question, I'm not familiar with $rxsplit, as I have yet to use it since Steven included it in MusicBee. Your guess is as good as mine. For what you are trying to achieve here, couldn't $Split do the job?
2) The reason why is that your search is running twice in that line, try it in notepad++.
(^.+)?\:\s starts at the beginning and ends at ": ", but its position in the line is not at the end yet. So, the expression repeats itself and starts at the beginning. "(^.+)?\:\s" matches "(Misa criolla): " and when it restarts after ": ", "(^.+)?\:\s" matches "(Credo)" because there's no ": " stop sign, so "(^.+?)\:\s" continues all the way to the end of the line. Now, you have two groups with "$1" (see the groups in the previous sentence enclosed in parenthesis).
In this case, you need to have an expression that's good for the whole line. From what you are trying to do, "
(^.+?)\:\s.*$" should be good enough. Still, I have a habit to enclose groups even if I'm not going to use them for a particular virtualtag because I can simply copy-paste the regex into another virtualtag unchanged and simply swap $2 for the $1. So, in your case, my ideal regex would be "
(^.+?)\:\s(.*$)"
I hope this helps.