I have a list of names formatted Surname, Given Name.
Blow, Joe
Doe, Jane
X, Malcolm
I want to reorder the names to be Given Name Surname. Is it possible to use Find & Replace to do this all in 1 swell foop? I can use PowerFind to select all of the Given Names & then either Copy or Cut them, but I can't figure out how to paste them in the right spots all at once. Is it easily doable? I could have done the replacing manually in all the time I've spent trying to save myself labor, but I want to believe that NWP has the power to do it for me, if I only knew how to tell it do so properly.
TIA,
Nick D.
reordering names in a list
Re: reordering names in a list
Hi Nick,
this is easily done in Nisus Writer Pro, using PowerFind Pro. Open the Find window (Cmd+f), then make sure "PowerFind Pro (regex)" is show in the drop down list.
In the "Find what" field, enter (.+), (.+).
In the "Replace with" field, enter \2 \1.
Click Replace All, and that's it.
Technical explanation: the find expression includes brackets. These instruct Nisus Writer Pro to capture the information that PowerFind obtains when looking for the expression ".+". ".+" means "any text", so you are basically telling Nisus Writer Pro to look for "any text", followed by a comma, then a space, and once again "any text". The Replace expression instructs Nisus Writer Pro to place the second expression (i.e. the text after the comma) first, then makes it insert a comma, and finally insert the first expression it has found. It may sound complicated, but once you've got the hang of it, there are basically no limits to what you can do with text. If you need help with the expressions, click on the tiny gear button next to the "Find what" field to select the expression in plain English; Nisus Writer Pro will then insert the regex version for you.
this is easily done in Nisus Writer Pro, using PowerFind Pro. Open the Find window (Cmd+f), then make sure "PowerFind Pro (regex)" is show in the drop down list.
In the "Find what" field, enter (.+), (.+).
In the "Replace with" field, enter \2 \1.
Click Replace All, and that's it.
Technical explanation: the find expression includes brackets. These instruct Nisus Writer Pro to capture the information that PowerFind obtains when looking for the expression ".+". ".+" means "any text", so you are basically telling Nisus Writer Pro to look for "any text", followed by a comma, then a space, and once again "any text". The Replace expression instructs Nisus Writer Pro to place the second expression (i.e. the text after the comma) first, then makes it insert a comma, and finally insert the first expression it has found. It may sound complicated, but once you've got the hang of it, there are basically no limits to what you can do with text. If you need help with the expressions, click on the tiny gear button next to the "Find what" field to select the expression in plain English; Nisus Writer Pro will then insert the regex version for you.