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

Parse String with Letters and Numbers

jatienza
8 - Asteroid

Hi,

 

Need help in parsing the raw data below. Output is also given below.

 

Raw Data

add
England EC2A 4
London N1 9QS
South Yorkshire  S60 1DL
NORTHUMBERLAND
Tyne and Wear CH45 4JL
Kent BR6 8NL
England
Wales 89B
England DN5 0

 

Output

add1add2
EnglandEC2A 4
LondonN1 9QS
South YorkshireS60 1DL
NORTHUMBERLAND 
Tyne and WearCH45 4JL
KentBR6 8NL
England 
Wales89B
EnglandDN5 0
4 REPLIES 4
BS_THE_ANALYST
15 - Aurora
15 - Aurora

@jatienza Nice challenge!

BS_THE_ANALYST_0-1677101222417.png

 

 

All the best,
BS

LinkedIN

Bulien
jatienza
8 - Asteroid

@BS_THE_ANALYST it's working but doesn't work if it is in Uppercase like this one:

 

addadd1add2
WEST YORKSHIRE BD5 7HFWESTYORKSHIRE BD5 7HF
BS_THE_ANALYST
15 - Aurora
15 - Aurora

@jatienza can you try this regex instead:

 

^([a-zA-Z ]+)(?:\s+([A-Z0-9 ]*))?$

 

I can't test it using Alteryx as I'm out at the moment. Can you see if that code works!

All the best,
BS

LinkedIN

Bulien
jatienza
8 - Asteroid

@BS_THE_ANALYST it is working now. Thanks a lot.

Labels
Top Solution Authors