zapierdrift

Zapier Extract Country Code from Line of Text with Multiple Seperators


I am trying to use the Zapier formatter to extract a country code from a line of text I am getting from a connected app (Drift).

The string comes into Zapier like this:

{"city":"Kissimmee","region":"Florida","country":"US","countryName":"United States","postalCode":"34747","latitude":55.5555,"longitude":-55.5555}

I am trying to get it to extract just the two-letter country code portion of that line.

Any ideas?


Solution

  • Or you can use a pattern:

    country\":\"(.*?)\"
    

    screenshot