Alteryx Designer Desktop Discussions

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

Regex Help

ManuelRodrigues
8 - Asteroid

Hi All,

 

I am trying to better myself at Regex and need to cleanse a data set [example image]. I basically need to parse the entire string after Home or Home -. what is the best way to write a regex for this pls? 

 

ManuelRodrigues_0-1636477669502.png

 

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@ManuelRodrigues ,

 

Keep it simple:

 

If [Start Location] = "Home" THEN "" ELSE

Substring([Start Location],5)

ENDIF

 

Cheers,


Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
CarliE
Alteryx Alumni (Retired)

Hi @ManuelRodrigues,

 

You can also use the regex tool in Alteryx to do this. You will want an expression like this:

HOME-(.*+)

 

The capturing group in the parenthesis will be anything after HOME. I use regex101.com to help me with regex.

 

If this helped your problem, please mark as a solution to help other members!

 

Thanks,

Carli
messi007
15 - Aurora
15 - Aurora

@ManuelRodrigues,

 

Another way to it :

 

messi007_0-1636478099146.png

 

Regards,

Labels