I am working with patient data and am parsing a 'Patient Name' column out using RegEx. The name column is structured as followed:
LastName FirstName MiddleName/Initial(sometimes) Suffix (sometimes)
Note: There are never any commas separating Last Name from First Name.
Examples:
Smith John B
Doe Jane
Smith John Brian Jr
Doe Jane Kate
My current RegEx works if there is a Middle Name or Middle Initial present, but will not work if a Middle Name/Initial is lacking. Can someone help make the expression dynamic to work even if there is no Middle Name/Initial? Below is my current expression:
(\w+)\s(\w+)\s(\w*)
Thanks for your help.
P.S. I know this can be done with a Text To Columns tool, but am trying to become more familiar with the RegEx tool.