Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to extract alphanumeric digits from column

Luk88kk
8 - Asteroid

Hello everyone,
I am a beginner user of Alteryx.
I need to extract products starting with 3 alpha-numeric digits for example:
F09999R98
0F6987U76
00T467T9T

If a product starts only with letters or numbers e.g. 128, TES... it should be removed or moved to another column.

I will be very grateful for your help. As I mentioned I am new and so far this problem is overwhelming me.

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @Luk88kk 

 

You can use below formula

IF REGEX_Match([Field1], "^\u{3}.*") or REGEX_Match([Field1], "^\d{3}.*") THEN "No" 
ELSE "Yes" ENDIF

 

REGEX_Match([Field1], "^\u{3}.*") is checking whether is starts with 3 letters and REGEX_Match([Field1], "^\d{3}.*") is checking whether is starts with 3 numbers. If it doesnt start with either of them then it flags it as Yes (its a mix). You can perform further action as required

 

Workflow:

atcodedog05_0-1621341977590.png

 

Hope this helps 🙂

jdunkerley79
ACE Emeritus
ACE Emeritus

Fairly similar to @atcodedog05 

 

jdunkerley79_0-1621342643508.png

 

 

I suggest a formula tool with an expression like:

!REGEX_Match([Field1], "^(\d{3}|\u{3}).*")

 

The REGEX_match will return true if the first 3 are just numbers of letters. The ! in front of it makes it inverted so T output is when mixed.

 

 

Luk88kk
8 - Asteroid

Hello,

I have applied both solutions and they work.
Thank you so much.

mceleavey
17 - Castor
17 - Castor

Hi @Luk88kk ,

 

I built this using the regex tool to parse out the values matching that pattern:

 

mceleavey_0-1621360267247.png

 

mceleavey_1-1621360292650.png

 

mceleavey_2-1621360312146.png

 

Hope this helps.

 

M.



Bulien

Labels
Top Solution Authors