1
Questions / Tricky regex expression...?
« on: July 02, 2023, 01:52:58 PM »
Hoping someone can help with this.
I have a custom field in MusicBee where I enter multiple values separated by a semi-colon.
e.g. FGH; JKL; ABC
I have an expression that I use in a Virtual Tag to determine whether any values in the Custom Field have been duplicated.
$IsMatch(<MyCustomField>,"(?<=(\b\w+\b).*)\1")
The problem which I've just realised is that this expression only works for the first value, i.e it picks up
ABC; FGH; JKL; ABC
but not
ABC; FGH; JKL; JKL
Would anyone be able to help me correct this expression?
I have a custom field in MusicBee where I enter multiple values separated by a semi-colon.
e.g. FGH; JKL; ABC
I have an expression that I use in a Virtual Tag to determine whether any values in the Custom Field have been duplicated.
$IsMatch(<MyCustomField>,"(?<=(\b\w+\b).*)\1")
The problem which I've just realised is that this expression only works for the first value, i.e it picks up
ABC; FGH; JKL; ABC
but not
ABC; FGH; JKL; JKL
Would anyone be able to help me correct this expression?