ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex match

cactooos
Átomo

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 RESPUESTAS 4
FrederikE
Púlsar
 

Hey @cactooos,

 

This should do: 

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

 

Unbenannt.png

cactooos
Átomo

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

steven_king
Meteoroide

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

 

123.PNG

cactooos
Átomo

works like a charm, thanks

Etiquetas
Autores con mayor cantidad de soluciones