Grep find/replace to switch Lastname, First M to First M Lastname
I almost have it but have run into a snag that i can't figure out...Hyphenated names
I have to create a index for a directory
I have pulled all the names using "create table of content" from the document that use a certain paragraph style
in the directory they are listed last, first but here they want first, last so i made a find replace using greps that flips them
FIND ^(\w+), (\w+)([.\w]+)?
REPLACE $2$3 $1
works fine for Rudy, Scott M
but fails on Rudy-Goon, Scott M
when it fails it does nothings it would look like the list on the right below after i run it
Rudy, Scott M Scott M Rudy
Rudy-Goon,Scott M Rudy-Goon,Scott M
Doe, John S John S Doe
Public, John Q John Q Public
any suggestions?
thanks in advance!!!!
scott
