Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting Name Format: First MI Last --> Last, First MI
#1
Hi,
I have been doing the above by sending text formatting commands - very unreliable:
e.g.

Quote:'CL

'CS{LL}
'X

'CR
0.3
key ", "
0.3

'Cv
'CSL
'X
'B

'T

I figure there is a better way using strings, etc. But I don't know how to do the jumps to blank spaces which is crucial. This is made more difficult since sometimes there is a middle initial and sometimes not.

Any ideas?

Thanks,
Stuart
#2
Code:
Copy      Help
;at first select all, then
str s.getsel
s.replacerx("^ *(\S+ *\S+) +(\S+) *$" "$2, $1")
;out s
s.setsel


Forum Jump:


Users browsing this thread: 1 Guest(s)