Remove first two or three letters from a string

I have strings that are all 16 characters and want to extract the letters at the beginning. The unfortunate part I cannot figure out is there are either two letters, or three letters at the start of every string. I’d like to export the two letters if there are only two and three if there are three.

Example data:
AB12345678912345
ABC1234567891234

Desired output:
AB
ABC

Is there a way to do this without a regex? If its a regex, I’ve been meaning to learn forever but not sure where to start.

Thanks in advance,
Eric

If you use the Regex Extractor node and the RegEx [A-Z]+ you’ll copy the letters to a new column.

If you use the Regex Split node and the RegEx ([A-Z]+)([0-9]+) you’ll get two new columns, one with the letters and one with the numbers.

4 Likes

Perfect elsamuel, that works perfectly.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.