I wonder if I may ask for some help with a regular expression. The list I am trying to sort is:
A. Culling Jnr
J. & K. Taylor
W. Dodd
K. Smith
Clough Family
G. Grieve
S. & D. Phipps
A. L. Newnham
Davies/Thompson
J. & D. Elms
R. Henson
D. G. Quinn
K. Shields
R. & L. Hammer
Brooks Family
C. Reid
R. Price
I have this for my regular expression:
([A-Z]\.\s[&?]\s[A-Z]\.\s|[A-Z]\.\s)(.+)
and my replacement is:
\1, \2
This results in:
Culling Jnr, A.
Taylor, J. & K.
Dodd, W.
Smith, K.
Clough Family
Grieve, G.
Phipps, S. & D.
L. Newnham, A.
Davies/Thompson
Elms, J. & D.
Henson, R.
G. Quinn, D.
Shields, K.
Hammer, R. & L.
Brooks Family
Reid, C.
Price, R.
If works for nearly everything, except where a person has two initials. I have spent hours playing with my search pattern, and I just can’t seem to resolve my problem.
Any help would be gratefully received.