if you do not feel comfortable with regex, like me
do search for <~~~ in all your files
this is a “flag sequence”, so make sure that it is not already there
if not found then go on.
Find what: <FIRSTNAME>
Repl with: <~~~LASTNAME>
Mode: Normal or Extended
Find what: <LASTNAME>
Repl with: <~~~FIRSTNAME>
Find what: </FIRSTNAME>
Repl with: <~~~/LASTNAME>
Find what: </LASTNAME>
Repl with: <~~~/FIRSTNAME>
Find what: <FIRSTNAME />
Repl with: <~~~LASTNAME />
Find what: <LASTNAME />
Repl with: <~~~FIRSTNAME />
now check for any missed ones
Find what: <FIRSTNAME
Find what: <LASTNAME
now delete the ~~~
Find what: <~~~
Repl with: <
you could reduce number of steps
Find what: FIRSTNAME>
Repl with: LASTNAME~~~>
Find what: LASTNAME>
Repl with: FIRSTNAME~~~>
those two would cover <LASTNAME> and </LASTNAME>
anyway i hope that it helps you or anyone else