Alteryx Designer Desktop Discussions

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

Parsing Data using REGEX

pxs132
7 - Meteor

Hi,

I am new to Alteryx. I am trying to implement some name rules for data quality assessment using existing regexs. Somehow some regexs don't work as expected. In the attached test workflow, the regexs do not catch special characters and digits in the [First Name] column. Your advice are most appreciated! Thank you.

4 REPLIES 4
MichaelLaRose
10 - Fireball

Hi @pxs132,

 

I am unable to run the workflow because you have not provided the Excel workbook. If you could send that file or a packaged version of the workbook that would be great.

 

If you are trying to catch any non-word characters you should be able to use: "\W"

 

If you are specifically trying to exclude the list of characters you have you need to escape some of them because they are special reserved characters.

 

Try "[@#\$%\^&\*0-9]"

 

Best,

Michael

pxs132
7 - Meteor

Thank you, Michael.
Attached please find the input data file.

MichaelLaRose
10 - Fireball

Hi @pxs132,

 

Seeing as you need to account for accented letters I have used the \p{L} construction.

 

Alteryx uses Peal syntax for regular expressions and \p{L} is the syntax for any character that is a type of letter. Likewise \P{L} is the syntax for any character that is not a type of letter.

 

You may need to expand this formula if you want to keep things like hyphens or apostrophes in names but I think this will get you a good portion of the way to your goal.

 

Best,

Michael  

pxs132
7 - Meteor

Thanks a lot Michael. Your solution works perfactly. Meantime I figured out that if I add ".*" before and after my original Regexs, they work too.

Labels