Alteryx Designer Desktop Discussions

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

Regex pattern matching

monish_chandra
8 - Asteroid

I'm trying to match a pattern and then extract the next two characters after pattern match. What is the Regex that I can use.

 

ASOD-CT sdjfkfjkh 359

euhndkn ASOD-CA 3845

3849 ASOD-AZ sdkkj

 

Expected result

CT

CA

AZ

 

I tried (.*ASOD-\u{2}) but it is not recognizing

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @monish_chandra 

 

ASOD-(\u{2})

Try something like this.

atcodedog05_0-1608054322061.png

 

Hope this helps 🙂

marcusblackhill
12 - Quasar
12 - Quasar

Hi @monish_chandra !

 

I'm not sure if I understood well, do you need to take the 2 letters after "ASOD"?

 

If is that, you can use regex tool with tokenize configuration, there use the expression "ASOD-[A-Z]*" and after that use a formula tool with the formula "left([Regex result],2)"

 

Hope that helps!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @monish_chandra 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

Labels