I have a load of names in a file in the format Lastname, Firstname:

Williams, Hywel
Williams, MarkĀ 
Williams, Roger
Williams, Stephen
...

Is there a simple way of reversing them in Notepad++, to get each line reversed into Firstname Lastname like so?

Hywel Williams
Mark Williams
Roger Williams
Stephen Williams
...

Or any other simple way of doing this?

link|improve this question

78% accept rate
feedback

1 Answer

up vote 4 down vote accepted

Use the "Replace" function with a regexp, replacing ^(.+), (.+)$ with \2 \1.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.