contact  |  about  |  sitemap

Reg Expression for Zip Code
Last Post 26 Apr 2010 09:57 AM by Tijn. 1 Replies.
Sort:
PrevPrev NextNext
Author Messages
don

--
23 Apr 2010 07:47 PM
I have extracted text that retreives city, state, and zip code

NEWARK, NJ 07104

i found this regex online (^\d{5}$)|(^\d{5}-\d{4}$)

but this doesnt seem to return the zipcode. I Have the Source Text as the correct variable to use and returned match is a text variable as well.

any better method of extracting the above zip code?


ps::: (i only use it to search another site so I dont need it in my datagrid, just need as input into a form on website)




Tijn

--
26 Apr 2010 09:57 AM
Try this one to scrape zip codes from web pages:
^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$

The attached script example shows how to use it.

Also see more regular expression variants at: http://regexlib.com/Search.aspx

match_zipcode.djs



Quick Reply
toggle
  Username:
Subject:
Body:
Security Code:
Enter the code shown above:

Submit

Powered by Active Forums

Forum participation and optional registration

You don't need to be registered to partcipate in the Djuggler forums, however if you want to subscribe to email notifications you need to register. You can also subscribe to the forum RSS feed.