So I'm trying to swap first name / last name in a large group of files, and the following expression works a treat
match: ^(.+) (.+).jpg
replace: \2, \1
Each of the JPG files is a person's name, and no matter how many names that person has, the last name gets put first, and the remaining names are appended with a comma. The only problem is when that person's name has some postnominal characters like Jr. or Sr.
How do I exclude something like Jr. and Sr. so the regex doesn't consider them to be a last name? I've tried using negative lookup this way, to no effect.
^(.+) (.+)(?!^Jr$).jpg