Free Trial

Alteryx Designer Desktop Discussions

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

REGEX w comma

hi2019
8 - Asteroid

  It is not counting if it has a comma- can this still be used?   REGEX_CountMatches([Payee Name],'[A-Za-z]+\s[A-Za-z]+\s[A-Za-z]+\s+') 

 

 

thanks

15 REPLIES 15
hi2019
8 - Asteroid

This is to count 3 spaces in this column it works but only if no comma or period

 

how to fix this

OTrieger
12 - Quasar

Hey @hi2019 

What you did so far with your WF and what is the challenge that you are facing, what you wrote is a very generic question. Please be more specific.

hi2019
8 - Asteroid

What I used for regex was to count 3 spaces within a field for payee name but I was testing it and I see it only counts spaces like JOHN SMITH JANN but if it is JOHN S. JANN or JANN, JOHN SMITH it doesnt read it as 3 spaces 

 

I need to identify if it has 3 spaces

 

- can I use or update what I have now?

 

thanks

OTrieger
12 - Quasar

I see, in this post it is explained how to count specific character, you can use \s for space.
https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Count-a-specific-characters-in... 

Try and see if this works for you.

hi2019
8 - Asteroid

it doesnt specify for commas - 

binuacs
21 - Polaris

@hi2019 your given data has only 2 spaces

image.png

hi2019
8 - Asteroid

I need it to count 3 spaces and exclude the comma (not counting comma)

 

JOHN SMITH, JR

count 3

 

JR JOHN SMITH 

count 3

 

APRIL MAY, SMITH

count 3

 

SMITH, MAY APRIL 

count 3

binuacs
21 - Polaris

@hi2019 the data "JR JOHN SMITH" has only two spaces, how are you counting 3 spaces?

hi2019
8 - Asteroid

After JR

After JOHN

After SMITH

or it doesnt count last one?

Labels
Top Solution Authors