Hi everyone,
I am having trouble with a regex formula in Alteryx that's supposed to flag rows based on whether they start with a lowercase letter. Here's what I am aiming for :
The objective is I want to flag rows where the text starts with a lowercase letter as "Combine" and all the other rows as "Keep".
I used the formula below -
IF REGEX_Match([F1], "^[a-z]") THEN
"Combine"
ELSE
"Keep"
ENDIF
The formula seems to be returning "Keep" for all rows, including those that should be flagged as "Combine".
The field "F1" is clean. Any advice on why this might not be working as expected ?
Thank you in advance for your assistance.
Solved! Go to Solution.
Hi @hari24
Please try the below formula, it worked.
IF REGEX_Match(Left([Field1],1),LowerCase(Left([Field1],1)),0) THEN
"Combine"
ELSE
"Keep"
ENDIF
Many thanks
Shanker V
Hello @hari24
It means that the first argument of your formula does not get matches as you only get results for the later part.
What you can do to simplify it, create a new field which will be Left([F1],1), that will leave you with only 1 character, you can can set a check if that one character is Upper Caps or not. Then you can get rid of that added field.
It worked, Thank you