Hi I can't figure out why this REGEX Tool formula isnt working in Alteryx when I have tested it out with success on a regex builder program.
Not sure if REGEX_MATCH in Alteryx functions differently somehow? Essentially I am trying to get the last occurrence of a string in a concatenation delimited by spaces.
Desired result: "CK*1140*H*QK*FF*RXQ*25/32*DNDCDDL*DDDD*DDDOSPOLY*0*1111"
Any help would be greatly appreciated. Thank you
Solved! Go to Solution.
Instead of REGEX, why not use the Text to Columns tool and split the data by row and use space as a delimiter?
Then, use the Tile tool and unique by your original CONCAT field, then use a sample tool to group by CONCAT field and choose LAST 1 of the values you want.
Based on your data, that’s what I would do.
Im on my phone now so I can’t build it on the fly
Agree with @caltang, I would not use REGEX for this, either split and filter, or a standard formula. The only thing in that REGEX formula that means you'll get the last, is the $. REGEX_Match will only ever return a True/False, Parse would be what you are after.
Trim(Right([CONCAT],FindString(ReverseString([CONCAT]),'\s'))) will get you your desired result.
Thank you! That worked perfectly
That wouldnt work here since I dont know how many strings will be concatenated together since this is bringing together 6 columns and there are potentially multiple trailing and leading whitespaces. I know that wasnt shown here in the example I provided as I tried to simplify it, but that is why I needed to use RegEx
User | Count |
---|---|
106 | |
85 | |
76 | |
54 | |
40 |