Jon,
Perfect. I ran the extension and it cleanly parse the data for the two columns I need, as always, you are a life saver, thank you!
David
------------------------------
David Wright
------------------------------
Original Message:
Sent: Thu September 26, 2024 09:56 AM
From: Jon Peck
Subject: extracting mixed alphanumeric string
Here is an easy way to do this. It uses the SPSSINC TRANS extension command, so install that via Extensions > Extension Hub if you don't already have it.
spssinc trans result=subj cata type=10 10
/formula "re.match(r'(\D+)(\d.+)', code).groups()".
It splits the input, variable code, into a part consisting of all the nondigit characters starting at the beginning until a digit is encountered and then the rest of the string. I set the output string variables to be 10 bytes long, but you can change that as needed.
Original Message:
Sent: 9/25/2024 5:15:00 PM
From: David Wright
Subject: extracting mixed alphanumeric string
I am in need of extracting two components from a alphanumeric column to create two new columns as seen below. The source column always has a defined string which ends when it hits the course number (which can have a letter or letters appended to it). Any help would be greatly appreciated.

------------------------------
David Wright
------------------------------