Alteryx Designer Desktop Discussions

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

How to filter/extract random position 3 numbers in string?

Jun4Ariat
Átomo

I need some help with the data below.  I need to extract only the 3 digits from the Merchant Reference column and have the result show in a separate new column (I listed the Result column I want to get).  Some of the rows do not contain the 3 digits , which is ok , they can just be blank.

I am totally new to Alteryx and this one is totally beyond me.  Help please!

Merchant ReferenceResult column
14295001898-evelynfigueroa-102lex102
MarisaThompsonPFG106106
PHX204 Francisco Gallegos204
PHX204 Cid Esperanza204
Amanda Sobi106PFG106
Teresa Aguilar  Lehi 203203
Kara Guerin- 14286001496- 103NAS103
Scrub Top-10039713 (LG) 
Arthur Cuevas Lehi 203203
13774004977-MickeyParis 
14288002080 Kaci Anderson 102LEX102
14279000825-CorbinSweatt 
Lynwood Knowles 104OCA104
Brian Williams 106 PFG106
13766011042-201Gil Haylee Griffith201
101-CaitlinFaust-10035836101
5 RESPUESTAS 5
geraldo
Púlsar

@Jun4Ariat 

 

Below is a workflow with regex examples to extract the new column

Jun4Ariat
Átomo

Thank you so much @geraldo!  This works perfectly!

Jun4Ariat
Átomo

@geraldo, for some reason, these 3 scenarios do not work with this solution ... can you help me again please?  all those 3 digits 204, 101 and 202 should be extracted. thanks!

 

Sue Ludwig 204-PHX
101 Carol Cortez 10048260
14279000929 (202sawgrass)

geraldo
Púlsar

@Jun4Ariat 

 

Replaces the regex tool with these expressions.
^\d{3}-|^\d{3}\s|-\d{3}[a-z]|\s\d{3}[a-z]|[a-z]\d{3}|\s\d{3}\n|\s\d{3}\s|\s\d{3}$|\s\d{3}-|\(\d{3}
and check if it meets the new texts. I'll look for a pattern that fits all cases and send it to you.

Jun4Ariat
Átomo

This solved the issue, thank you so so much!

Encuestas
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Etiquetas