Hello. I have successfully found a regex that works at regex101 but does not work as expected in Mp3Tag. (Test Data at the end of post.) I want to catch (and remove) any comma that does not meet the conditions below which is why I've used negative lookahead.
Regex:
,\s(?!\w+$)(?!\(\w+)(?!The\s\(.+\))
(?!\w+$) REM Exclude "Something, The"
(?!\(\w+) REM Exclude Some Text, (Other Text)
(?!The\s\(.+\)) REM Exclude "Something, The (More Text)"
Summary of conditions:
NOT Some Text, (Other Text) [e.g. Is This The Way To, (Amarillo)]
NOT Something, The [e.g. Way, The]
NOT Something, The (More Text) [e.g. Way, The (Extended Remix)]
NOT Text, (More text here) (With other text here) [e.g. Devotion, (I Wanna Give You) (12 Inch Mix)]
In the test data, it should catch only commas in the bold text (1 and 2), whilst excluding the others (3,4 & 5):
- When The Going Gets Tough, The Tough Get Going
- This is it, I'm Done
- Some Text, (Other Text)
- Something, The
- Something, The (Extended Remix)
I'll keep working on it. Thank you