The format of the names is below - where X or Z are letters or numbers or underscores or '-' and spaces are spaces.
XXXXXXX XXXXXXXX ZZZZZZZZZ
or
XXXXXXX ZZZZZZZZ
I want to be able to take the last part of the name (ZZZZZZ) and put it in front so I would end up with
ZZZZZZZZZ XXXXXXX XXXXXXXX
or
ZZZZZZZZ XXXXXXX-tomos
Hy Tom,
any editor with search&replace with reg ex mode can do this.
FROM:
XXXXXXX XXXXXXXX ZZZZZZZZZ
XXXXXXX ZZZZZZZZ
RegEx: find all greedy till last space, then find the rest
RegEx: ^(.+) (.+)$
Explanation:
^ => match start of string
() => group what is found for later back referencing
. => find one any sign
+ => find (at least)one or (as many as)more from the term just typed before, one of any sign, in our case. But only till the next term is found.
$ => end of string
TO:
ZZZZZZZZZ XXXXXXX XXXXXXXX
ZZZZZZZZ XXXXXXX
Replace: all from group two, then an space, then all from group one
Replace: \2 \1 or $2 $1, belongs what reg ex engine/style is used
So:
open Search&Replace in your favorite text editor or Office
Find: ^(.+) (.+)$
Repl: $2 $1
[X] RegEx
Depending of how your string looks in real, it could be that this RegEx has to be fine tuned. PM me if you like.
HTH?
CU