How to filter string

Hi i need to filter out the address based on street, Suburb, State and Zip Code.
the highlighted blue is the address and the highlighted yellow is the expected output.

image

I already solve the street. my problem now is the Suburb, state and ZIP

thank you in advance
-Vincent

HI,

How about the following?

m = System.Text.RegularExpressions.Regex.Match(strAddress,"^(?<STREET>[^,]+),(?<SUBURB>.*) (?<STATE>\w+) (?<ZIP>\d+)$")

then

m.Groups("STREET").Value
m.Groups("SUBURB").Value
m.Groups("STATE").Value
m.Groups("ZIP").Value

Sample20230327-4L.zip (2.3 KB)

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.