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.
SOLVED

regex_replace keep the brackets

dlesny
8 - Asteroid

Hello

I am trying to use Regex_replace () formula and I need to replace this:

 

Acceptance Criteria (GWT)

 

with that:

 

Enabler: (BC1.4.9) Acceptance Criteria (GWT)

 

This is the Formula I am using but it ignores the brackets: So instead of this: Enabler: (BC1.4.9) Acceptance Criteria (GWT) I get: Enabler: BC1.4.9 Acceptance Criteria GWT.

 

Well not exactly in this example, as it also ignores the brackets from the first part of the Formula but in general.

 

regex_replace([ACTIVITIES],"Acceptance Criteria (GWT)", "Enabler: (BC1.4.9) Acceptance Criteria (GWT)")

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

Hi @dlesny 

 

Wouldn't this work better?

 

"Enabler: (BC1.4.9) " + [Field]

 

Cheers,

Thableaus
17 - Castor
17 - Castor

Also, the correct version would be:

 

regex_replace([ACTIVITIES],"Acceptance Criteria \(GWT\)", "Enabler: \(BC1.4.9\) Acceptance Criteria \(GWT\)")

 

The parenthesis need to be escaped, since they are special characters.

 

Cheers,

CharlieS
17 - Castor
17 - Castor

Hello @dlesny 

 

Have you thought about going the Find Replace route? Check out the attached workflow for an example.

 

 

dlesny
8 - Asteroid

@Thableaus  Many times the [Field] also changes. Thank you for RegEx that would work.

 

@CharlieS That is much better idea, Thank you! :) 

Labels