Help

Regex for this field?

Topic Labels: Formulas
Solved
Jump to Solution
870 1
cancel
Showing results for 
Search instead for 
Did you mean: 
AM858
6 - Interface Innovator
6 - Interface Innovator

I am looking to filter properties for owners that live out of state. I get information from my data source in the format below. What’s a Regex formula I can use to separate out the City, State, and 5digit ZIP?

image

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

I take it that you’re looking for three fields, therefore three formulas. Here’s what I came up with for a {City} field formula:

IF({Recorded Owner City State Zip}, REGEX_EXTRACT({Recorded Owner City State Zip}, "(.*)(?:,.*)"))

{State} field formula:

IF({Recorded Owner City State Zip}, REGEX_EXTRACT({Recorded Owner City State Zip}, "(?:, )(.{2})"))

{Zip} field formula:

IF({Recorded Owner City State Zip}, REGEX_EXTRACT({Recorded Owner City State Zip}, "\\d{5}"))

Screen Shot 2021-08-08 at 12.33.07 AM

See Solution in Thread

1 Reply 1
Justin_Barrett
18 - Pluto
18 - Pluto

I take it that you’re looking for three fields, therefore three formulas. Here’s what I came up with for a {City} field formula:

IF({Recorded Owner City State Zip}, REGEX_EXTRACT({Recorded Owner City State Zip}, "(.*)(?:,.*)"))

{State} field formula:

IF({Recorded Owner City State Zip}, REGEX_EXTRACT({Recorded Owner City State Zip}, "(?:, )(.{2})"))

{Zip} field formula:

IF({Recorded Owner City State Zip}, REGEX_EXTRACT({Recorded Owner City State Zip}, "\\d{5}"))

Screen Shot 2021-08-08 at 12.33.07 AM