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

Parsing strings

JGHOLLAND
7 - Meteor

I have a string like "XYZ123456".  I need to parse it into "XYZ" and "1" and "23456".  Is this a regex solution?  

4 REPLIES 4
ScottLewis
11 - Bolide

Depends on what other forms the string can take. If it's always 3 characters, 1 character, 5 (or the remainder) then I would do it with substring formulas because they're easier to read and maintain. If it's something like Any number of letters, 1 Number, any number of numbers then probably easier to Regex. 

usmanbashir
11 - Bolide

@JGHOLLAND 

Are your three sections always as below? 

- 1st three characters

- 4th character

- 5th-9th character

 

If so use substring function. 

 

2024-03-28_16-12-03.png

flying008
15 - Aurora

Hi, @JGHOLLAND 

 

FYI.

([a-z]{3,})\s?(\d{1})(\d{5,})

 

录制_2024_03_29_09_38_25_547.gif

JGHOLLAND
7 - Meteor

Thanks to everyone for the help!

Labels
Top Solution Authors