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

Parsing Numbers and Characters from String

DHB
8 - Asteroid

Hi all,

 

Hope you're keeping well.  I wondered if anyone could help me to parse some codes from a string. 

 

The codes have these characteristics;

  • Always start with 4 digits (no more than 4)
  • Sometimes have letters (between 1 and 4) at the end of those digits
  • The start of the code is always the first instance of a digit in the string
  • Prior to the code there is always a letter code which sometimes contains a space or '&'.  These vary in length.

Here's an example of the data (STRING) and what I'd like to achieve (TARGET)

STRINGTARGET
AGRONOMY 3012RW Innovation in Agronomy III3012RW
ANAT SC 1102 Human Biology IA1102
ANAT SC 1102UAC Human Biology IA1102UAC
ANAT SC 1103 Human Biology IB1103
C&ENVENG 1008 Eng Plan & Design I1008
C&ENVENG 1008UAC Eng Plan & Design I1008UAC
C&ENVENG 1009 Civil&Env Eng 11009
BIOTECH 7003 Advanced Research Techniques7003
BIOTECH 7004 Molecular Micro & Vaccines7004

 

Any help would be greatly appreciated.

 

Best,

 

DHB

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @DHB ,

 

Sure the regex and workflow to catch the code.

atcodedog05_0-1589438964163.png

 

Hope this helps : )

 

Cheers and Happy Analyzing 

 

DHB
8 - Asteroid

That's perfect.  Thank you so much 

atcodedog05
22 - Nova
22 - Nova

Hi @DHB ,

 

Glad to hear that helped.

 

If that helped can you please mark my post as "Accept solution"

 

Thank you : )

Labels