I have two coloumns one is for zip code which I'm using a regex (^([A-Za-z]{2})(\d{9}|\d{5})$) for, and the second one is country codes. I only would like to apply my regex where country code is "US".
Can i do it with the formula function, if not how?
I appreciate for your help
Solved! Go to Solution.
Thanks, can I use parse instead of match?
Realizing that you asked specifically to do this with the formula tool, I will first say that I think using a filter tool to grab all records where country == 'US', then using the regex tool to parse the codes, then using a union tool to recombine the records would be the easiest method.
That being said, with the formula tool specifically, I would suggest using REGEX_Replace() with the code I posted above with replace = '' to remove the part of the string that you do not want.
I could be misunderstanding your problem, though.