The Inspire Cyber Monday promo has been extended to Dec. 1! This offer is discounted off the Early Bird price and includes 20% off for conference-only passes and 10% off training passes.

Alteryx Designer Desktop Discussions

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

Regex: Data extraction from string

8 - Asteroid

I'm trying to extract text and numeric patterns from a string. The strings are in the format of Account names, numbers, and some numbers.


1. Account Name 1   123456 10.256

2. Account & Na@me                      2789 11\\456

3. Ac_NT N123ame                                                             351462 12/453


The problem I’m facing is that the account name can have numbers within it, alpha/special characters/spaces within it.


When I write a pattern to extract the name, it greedily parses the spaces after the name and the account numbers after it. The only pattern I distinctly see in the data is that there is at least 3 spaces after the account name and before the account number.


So a pattern that catches everything before 3 spaces and then 3 or more digits after the spaces is what I’m looking for.


Would be great if someone can take a shot at this!


12 - Quasar
You could try


Where \S is non-whitespace.
19 - Altair
19 - Altair

Hi @aravind_sk 


Try this one




(.*?)  extracts all non-greedy

\s{3,} 3 or more spaces

(\d{3,}) 3 or more digits

\s+ 1 or more spaces

(.*) rest of the line


giving this





8 - Asteroid

Thanks Dan! This one worked. I'll have to learn more of non-greediness :)