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

How to remove 1), 2), 3) ...10) text from program titles

hellyars
13 - Pulsar

I have a field "programTitle".   Unfortunately, programTitle my or may not have a number and parentheses in front of the actual title.   For example, 1) Program Title, 2) Program Title....10) Program Title. I want to get rid of theses.   A LEFT ([programName], 2) does not work because it misses 10), 11), 12)....

 

Update -->.  I want to remove any instance of 1), 2)...10).  But, there may a later instance of ")" in the actual programName if an acronym is used.  I don't want to loose that. 

 

Any thoughts?

 

5 REPLIES 5
MarqueeCrew
20 - Arcturus
20 - Arcturus

Would you like to try with a regular expression or without?

 

RegEx_Replace([Program Title], "\d+\)\s*(.*)",'$1')

That will find anything after 1 or more numbers followed by the end parenthesis ')' character plus 1 or more spaces.

 

Trim(Substring([Program Title],FindString([Program Title], ')')+1))

That finds the first end parenthesis (zero-based counting) and then gets everything after it.  That result is then TRIMmed to remove spaces before and after it.

 

Cheers,
Mark

 

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
ivoller
12 - Quasar

 Formula Tool with something like REGEX_Replace([Field1], "\d+\) ", "") should work

 

Iain

fevizcaino
5 - Atom

See attached solution.

 

Hope it helps.

 

Fernando Vizcaino

ivoller
12 - Quasar

Mark's (@MarqueeCrew) answer is more comprehensive than mine.

hellyars
13 - Pulsar

Both work great.  Thanks.

Labels