We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Splitting out text from numbers

Ahasan13
7 - Meteor

Hi All,

 

I am trying to split out numbers and text and I got it by using RegEx and under Regular expression, I put in "(\d+)\s(.+)" 

 

 

Screen shot of Original                                                                                 

Ahasan13_0-1678892222355.png

 

 

Screen shot of after applying RegEx

Ahasan13_2-1678892313764.png

 

 

My question is how do I get that "?" out? Thanks in advance for all the help!

 

 

8 REPLIES 8
binuacs
21 - Polaris

@Ahasan13 Can you try (\d+)\s\.(.*)

 

binuacs_0-1678892599146.png

 

Ahasan13
7 - Meteor

Does not work 

binuacs
21 - Polaris

@Ahasan13 I guess then it is not a period character, some non-ascii character. Can you try the below formula

 

(\d+)\s[^A-Za-z](.*)

 

 

Christina_H
14 - Magnetar

Maybe try (\d+)\s.\s(.+)

However if all your data is in the same format, you could also use text to columns or just formulas, e.g. Left([Account Name],4) and Right([Account Name], Length([Account Name]-7)

Ahasan13
7 - Meteor

This worked for me thank you! Also going to post another question regarding separating out things like this 

 

"Total Assets → Current Assets → Cash" 

 

Some of them have 2 arrows and some have more. I tried using the same formula but I guess it doesn't work for that. 

Christina_H
14 - Magnetar

I don't know how it would work with RegEx, but you can copy the arrow into a Text to Columns tool and it works just fine

Christina_H_0-1678894017017.png

 

Ahasan13
7 - Meteor

thank you this worked!

binuacs
21 - Polaris

@Ahasan13 Another option to replace the non-printable characters 

 

binuacs_0-1678896576871.png

 

 

Labels
Top Solution Authors