flipping names with leading numbers
Posted: Sat Sep 10, 2016 3:30 am
new at this not to smart lol would like to flip first names with last names leaving the leading numbers and a having a comma between the last name and the first name, also some have three names, I found the commands they work but not the way I would like these are a couple of examples
BS0100-02 - George Strait - Go On
BS0100-03 - John Michael Montgomery - Little Girl
would like them to look like these
BS0100-02 - Strait, George - Go On
BS0100-03 - Montgomery, John Michael - Little Girl
found these the first one flip the names ok with the comma between the first and last name but strip the leading numbers found I could added them back in field 7 and 10
DO:
RegEx(1)
Search: (.+) (.+)( - .+)
Replace: \2, \1\3
found this, it left the leading numbers but no comma between last and first name and to much space between the names, found nothing for the three name issue
Regex(1)
Match:
(^[^-]+-[^-]+-)([^,]+),([^-]+)(-.+)
It selects the stuff between the dashes by looking for non dashes [^-]
Replace:
\1\3\2 \4
Include Ext. Not checked!
BS0100-02 - George Strait - Go On
BS0100-03 - John Michael Montgomery - Little Girl
would like them to look like these
BS0100-02 - Strait, George - Go On
BS0100-03 - Montgomery, John Michael - Little Girl
found these the first one flip the names ok with the comma between the first and last name but strip the leading numbers found I could added them back in field 7 and 10
DO:
RegEx(1)
Search: (.+) (.+)( - .+)
Replace: \2, \1\3
found this, it left the leading numbers but no comma between last and first name and to much space between the names, found nothing for the three name issue
Regex(1)
Match:
(^[^-]+-[^-]+-)([^,]+),([^-]+)(-.+)
It selects the stuff between the dashes by looking for non dashes [^-]
Replace:
\1\3\2 \4
Include Ext. Not checked!