Alteryx Designer Desktop Discussions

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

Regex

Alteryx_user_123456
6 - Meteoroid

Hi All, 

 

I'm trying to create a Regex that will pick out only required information from a text string. Running into trouble setting it up, appreciate any help from the community. 

 

Below are some sample texts to parse, essentially I want to extract just the "CON-1234567" information in a separate column. 

CON-1234567 abc testing site 

con-1234567 abc testing site

abc testing site CON-1234567

abc testing CON-1234567 site

CON-1234567_abc testing site

 

Thanks in advance!

4 REPLIES 4
nagakavyasri
12 - Quasar
flying008
15 - Aurora

Hi, @Alteryx_user_123456 

 

FYI.

 

(?:^|\s)(\w+-\d+)(?=\s|_|$)

 

 

录制_2024_01_12_13_32_48_424.gif

 

2- By use formula of regex:

REGEX_Replace([Txt], '^[[:alpha:]\s]*?(\w+-\d+)[\s_]*?.*$', '$1')

 

录制_2024_01_12_13_47_39_455.gif

grazitti_sapna
17 - Castor

Hi @Alteryx_user_123456 

I have made Workflow for your Problem. Please Check.

If it works Kindly accept it as Solution.

Thanks

Sapna Gupta
Alteryx_user_123456
6 - Meteoroid

Thank you, this worked well! 

Labels
Top Solution Authors