My regexp is tripping up on strings like this because they contain numbers in the title part:
Vierne07Divertissement (No.11 of 24 pièces en style libre, Op.31).flac
I'm trying to get Vierne and 07 to swap places and to add a hyphen:
07 Vierne - Divertissement (No.11 of 24 pièces en style libre, Op.31).flac
But I'm getting:
24 of - pièces en style libre, Op.31).flac
The regexp is settling on "of24" instead of "Vierne 07". Can anyone explain how to get it to take the first match? I've tried all sorts of combinations using ^ (at the front) and ? (for non-greedy repeats), but admit I'm a bit lost.
This needs to work with strings like: LouisVierne 07 Divertissement (No.11 of 24 pièces en style libre, Op.31).flac Louis James AlfredLefebure-Wely 12 Sortie in E flat major.flac
All names except the last need to be dropped, but in each case this regexp only drops the first name. Again, I'm stuck on how to make it behave as I need it. Any ideas, please?
I've noticed that by removing the first ? from the regexp it actually works on the 2nd string above, but like my earlier regexp it fails on the 1st because it matches " of 24 " in the title.