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.
SOLVED

Split column from number in a text string using Regex

EJ_Alt
7 - Meteor

Hi Alteryx family,

 

I need some help with a simple regex (or any) solution that splits a column in two based on the first occurence of a number in string.

 

Thanks, EJ

 

EJ_Alt_1-1606347707135.png

 

 

8 REPLIES 8
Qiu
21 - Polaris
21 - Polaris

@EJ_Alt 
Something like this?

1126- EJ_Alt.PNG

AkimasaKajitani
17 - Castor
17 - Castor

Hi @EJ_Alt 

 

Please use this syntax.

(.*)\s(\d+\s[A-Za-z]{3}\s\d{4})

 

If the date is single digit, it will be work.

 

AkimasaKajitani_0-1606348796895.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @EJ_Alt 

 

Here is my take on it.

Regex

(.*)\s(\d.{9,10})

Output:

atcodedog05_0-1606368038107.png

Hope this helps 🙂 Feel to ask if you have any questions

EJ_Alt
7 - Meteor

Thanks @Qiu . This works well

EJ_Alt
7 - Meteor

Thanks @AkimasaKajitani . Perfect, my workflow sometimes has single digits.

EJ_Alt
7 - Meteor

Thanks @atcodedog05 . Also like your solution. Proves Regex is highly flexible.

atcodedog05
22 - Nova
22 - Nova

Hi @EJ_Alt 

 

You are allowed to mark multiple solution. So feel free to mark all the posts which is helpful as solution.

 

Happy to help🙂

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @EJ_Alt 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

Labels
Top Solution Authors