I can not find any information about mods for sayregexp in the change history since V2.50. Maybe my coding is is the root cause, however any help or information about correct usage of this very helpful function is highly appreciated. At the moment I have no glue how to fix that.
Anyway MP3TAG is a great piece of SW and may thanks to all who make it available!
I tried to modified the Pone Discogs plugins in order to add the Featuring artists in the artists field (Artist = Artist & FeaturingArtist).
Featuring artists are written in the Discogs data:
"extraanv&role track": "Graham Candy (Featuring)"
As I want to add " & " between the track artist name and the featuring artist(s), I first modify the preceding with:
"extraanv&role track": " & Graham Candy (Featuring)"
This can be done with this command:
RegexpReplace "(?<="extraanv&role track": ")((?:[^"])+?)(?=(Featuring)")" " & $1"
Then I need to store " & Graham Candy (Featuring)" in my output buffer.
So I need to capture it using a regular expression:
sayregexp "(?<="extraanv&role track": ")(\s+[^"]+?)(?=\s+(Featuring)")" " & " "<>"
But even if this is a correct regular expression (tested on regex101.com engine), it does match twice instead of a single match.
So the output is:
Output : >& Graham Candy & & Graham Candy<
instead of
" & Graham Candy"
So I introduced a non-capturing group :
sayregexp "(?<="extraanv&role track": ")(?:\s+[^"]+?)(?=\s+(Featuring)")" " & " "<>"
This time the output is:
"& Graham Candy"
I didn't find a way to include the preceding white space, though it does work on other Regular Expression engines.
I wonder which is the internal regular expression engine used by Mp3Tag.