Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex Formula not working

BobbyQ
7 - Meteor

I have two zip codes and one of them starts with a letter. I want to be able to match the one with a letter and assign a value. The formula I am using is as follows:
"IF REGEX_Match([Zip], "^[A-Z]$") then 2 else 1 ENDIF"

The two entries are as follows for Zip:

43416
M9W5P4

 


I was expecting a 1 for 43416 and a 2 for M9W5P4 but am instead getting a 1 for M9W5P4. Any help would be greatly appreciated. Thank you

2 REPLIES 2
binu_acs
21 - Polaris
BobbyQ
7 - Meteor

Thank you!

Labels
Top Solution Authors