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

Special Characters in Alteryx

sharonsal
6 - Meteoroid

I am new to Alteryx, and am trying to use the Regex tool to find special characters, in a particular column.

 

For example, if it found any special characters that are not a square bracket, a curly bracket or a hyphen, then, those would be flagged as matches.

 

I would like it to start from the beginning of the word, through to the end of the word(s) and try to find any special characters that are not in the list above.  The field in question can contain more than one word separated by spaces.

7 REPLIES 7
Qiu
20 - Arcturus
20 - Arcturus

@sharonsal 
I believe we can do it with Formula, Regex and Find and Replace Tools.
I prefer the Find and Replace Tool since it will be easy for maintenance, if you will add or reduce the special characters.

1105-sharonsal-1.PNG1105-sharonsal-2.PNG

apathetichell
18 - Pollux

formula tool - new boolean field called match

 

!REGEX_Match([Field1],".*[\[\]\{\}-]+.*")

 

this means if there is one []{} or - it will be false - otherwise true. You could also use it in a filter tool.

sharonsal
6 - Meteoroid

Hello Qui,

 

Thanks very much!

sharonsal
6 - Meteoroid

Hi Apathetichell,

 

Thanks, for another excellent solution!

sharonsal
6 - Meteoroid

Hello,

 

I want to incorporate another check to also find the word in, so added this:-

 

!REGEX_Match([STRENGTH],".*(\sin\s)+.*")

 

It works by itself, but, when added to the other check you wrote (slightly amended to find + sign instead of hyphen, but, it does not work when I combine them.

 

So I tried:-

 

!REGEX_Match([STRENGTH],".*[\[\]\{\}+]+.*") or

!REGEX_Match([STRENGTH],".*(\sin\s)+.*")

 

Any suggestions on how to write the above checks as one or suggest why they are not working would be appreciated.

 

 

 

apathetichell
18 - Pollux

 "-" isn't a special character - "+" is... so \+ is needed to search for "+"

 

for "in" since you don't want to tag "into" or "introvert" you do want \sin\s - it doesn't need the ()

 

I'd stick with your or usage to allow for individual part testing.

sharonsal
6 - Meteoroid

OK, thanks.

Labels