Reverse Name order in Notepad++

6

1

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?

fredley

Posted 2011-03-22T22:12:38.043

Reputation: 3 197

Answers

7

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

user1686

Posted 2011-03-22T22:12:38.043

Reputation: 283 655