Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

regex replace help

Ultralightbeam
8 - Asteroid

Hello I have an array of strings example is (AX,AXAPTA, Microsoft Dynamics AX), using regex replace i'm not sure of what syntax to use where if this specific AX is in a string it will be classified as Microsoft Dynamics AX

5 REPLIES 5
Qiu
20 - Arcturus
20 - Arcturus

@Ultralightbeam 

So you want the AX to be replace by Microsoft Dynamics AX?

Can you give your desired output?

Ultralightbeam
8 - Asteroid

@Qiu 

I have a series of words in a string separated by a comma (,) so now I want AX to be replaced by Microsoft Dynamics AX 

Qiu
20 - Arcturus
20 - Arcturus

@Ultralightbeam 
I assume you dont want "Microsoft Dynamics AX" to be replaced.

Capture03.PNG

Ultralightbeam
8 - Asteroid

@Qiu I think my question was wrong

So I have an input see image below, where as System contains multiple words delimited by comma, for every system I want it to be classified to something else using a conditional statement and further will be text to rows (see second image for output) note that duplicated on the input will only count as 1 row.

- I think it shouldn't be compared as contains (AX is also contains in PortAX while it's different)

Ultralightbeam_1-1611558130511.png

 

Expected Output

 

Ultralightbeam_2-1611558140036.png

 

 

clmc9601
13 - Pulsar
13 - Pulsar

Hi @Ultralightbeam,

 

After the "expected output" shown above, you could try placing a formula tool with this formula:

 

IF Regex_CountMatches([System], "(?:^|[^\w])AX")>0

THEN "Microsoft Dynamics AX"

ELSE [System or Field2]

ENDIF

 

It looks for either the start of a string or any non-letter character before "AX".

Labels