Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Regex parse

FECL3
8 - Asteroid

How would I regex parse this data so I have two columns, one with the words and the other with the digits? They have uneven spaces between the characters too. 

 

Please see attached

 

 

7 REPLIES 7
atcodedog05
22 - Nova
22 - Nova

Hi @FECL3 

 

The process would be to clear duplicate spaces with data cleasing tool.

 

And here is the regex config

atcodedog05_0-1606154924088.png

Output:

atcodedog05_0-1606155005598.png

Workflow:

atcodedog05_1-1606155018687.png

 

Hope this helps 🙂 Hope this what you are looking for is not let me know i can help


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

PhilipMannering
16 - Nebula
16 - Nebula

@atcodedog05 Pretty sure that your regex will leave lots of trailing spaces

atcodedog05
22 - Nova
22 - Nova

@PhilipMannering 

 

My first step was to use data cleansing tool to remove duplicate, leading and trailing space 

hence it should be able to handle it 😅

FECL3
8 - Asteroid

Thank you - works a treat!

 

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @FECL3 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

FECL3
8 - Asteroid

If one of the lines was a negative number where the digits would typically be - how would I adapt the regex parse. Thanks in advance

atcodedog05
22 - Nova
22 - Nova

Hi @FECL3 

 

I have modified the regex to handle it.

 

(.*)\s(-?\d*)

I modified the current data to have negative number.

 

Output:

atcodedog05_0-1606156771805.png

 

 Hope this helps 🙂

Labels