Alteryx Designer Desktop Discussions

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

Issues with Regex Match

MysticalAz
Astéroïde

I have the below text input:

MysticalAz_0-1665772676709.png

 

With this formula......

MysticalAz_0-1665772577651.png

 

I expect it to look like this:

MysticalAz_1-1665772733977.png

 

But instead, I'm getting this:

MysticalAz_2-1665772754297.png

 

 

Any idea what I may be doing wrong? Thanks in advance. 

4 RÉPONSES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@MysticalAz ,

 

I took a slightly different approach with this:

 

IF 
	(Contains([Record ID],"EAP") OR
	 Contains([Record ID],"RTR") OR
	 Contains([Record ID],"LPP")) AND 
	(Contains([Record ID],"LQL") OR
	 Contains([Record ID],"PRP")) 
THEN "Level 1, Level 2"
ELSEIF
	Contains([Record ID],"EAP") OR
	Contains([Record ID],"RTR") OR
	Contains([Record ID],"LPP")
THEN "Level 1"
ELSEIF
	Contains([Record ID],"LQL") OR
	Contains([Record ID],"PRP")
THEN "Level 2"
ELSE Null()
ENDIF

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Matthew
Bolide

this should work, you just need to add some wildcards to your pattern:

 

 

REGEX_Match([Record ID], '.*EAP.*|.*RTR.*|.*LPP.*')

 

 

Matthew_1-1665774423844.png

 

 

 

 

 

MilindG
Quasar

MilindG_0-1665773521268.png

 

MysticalAz
Astéroïde

Thank you all for solutions!! @Matthew 's solution worked best for me as my actual dataset has about 200+ different record IDs. It was easier to concat with the .*? and plug into the formula. 

Étiquettes