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
Solved! Go to Solution.
If there is a space at the end of each names then it will count
oh ok but can we exclude not counting commas?
the given regex only counts spaces, it doesn't count any other characters. \s+ counts only the spaces
hmm, when I tried it didnt work?
example JOANN TRANSPORTATION CANE
showed |JOANN|TRANSPORTATION|CANE|
count was 1?
I edited it slightly. See attached.
As for why you got one...did you attempt to retype what was in the image, or did you download the Alteryx workflow and copy and paste directly from there? I suggest you do the latter, but in case you did the former, here is each expression for you to copy and paste.
Name Copy
Trim([Name])
Name Copy
REGEX_Replace(ReplaceChar([Name Copy], '. ,', '|'), '\|+', '|')
Count
IF IsEmpty([Name Copy])
THEN 0
ELSE REGEX_CountMatches([Name Copy], '\|') + 1
ENDIF