In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Split alphanumeric string using Regex

Noob_1-800
5 - Atom

Hi - 

 

I have a dataset with the following column

 

ABCD1234

ABCDE1345

ABCDEX2345

 

The alpabets can vary, but the numeric length is always 4 character 

2 REPLIES 2
binu_acs
21 - Polaris

@Noob_1-800 One way of doing this

binuacs_0-1684619721045.png

 

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

@Noob_1-800 ,

 

If the numeric length is always 4 characters, you don't need to use RegEx function.

Here are two ways. (As RegEx requires more resources in general, I would recommend another option.)

 

Using RegEx

NumericData = REGEX_Replace([Data], "[a-zA-Z]+", "")

AlphabeticData = REGEX_Replace([Data], "\d+", "")

 

Without RegEx

NumericData = Right([Data], 4)

AlphabeticData = Substring([Data],0,Length([Data])-4)

 

Output

Yoshiro_Fujimori_0-1684619832980.png

 

Labels
Top Solution Authors