Alteryx Designer Desktop Discussions

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

Regex match

cactooos
5 - Atom

Hi,

I am looking for a way to parse a substring in the form ABCXXXX or ABC-XXXX where XXXX are any digits.

Below example of expected result

textmatch
Max has a cat 
orange cats ABC7897 are the bestABC7897
maybe ABC-1234 better than dogsABC-1234
but DEF-5678 some not agree 



4 REPLIES 4
FrederikE
13 - Pulsar
 

Hey @cactooos,

 

This should do: 

.*ABC[-]?\d+.*

 

Unbenannt.png

cactooos
5 - Atom

Thanks but as a result I would need the matched substring rather than just true or false

steven_king
6 - Meteoroid

Hey @cactooos, you can add a couple parentheses to the expression and change the Output method to Parse.

 

123.PNG

cactooos
5 - Atom

works like a charm, thanks

Polls
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!
Labels