Click here to Skip to main content
11,805,266 members (51,876 online)
Click here to Skip to main content

Getting Zip+4 from

, 2 Nov 2005 39.3K 300 21
Rate this:
Please Sign up or sign in to vote.
Getting Zip+4 from


I must start by stressing that this is for educational purposes only!! Ok, now that I got that out of the way.

The purpose of this project is to demostrate how to extract data from a website.

Lets get right to the good stuff.....the code!

The Code

The first step is to format the url with all the required information.

<P><FONT color=#0000ff size=2>Function</FONT>
<FONT size=2><P>strAdd = ReplaceSpaceWithPlusSign(txtAddress.Text)</P>

Now that you have the correcly formatted URL pass it to a function to read the websites source code.

<FONT size=2><P></FONT>

Now that you have the source code pass it to another function that uses regular expressions to find the zip code.

<FONT size=2><P></FONT>

Thats it!!


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Ryan Rader
Web Developer
United States United States
Specialize in interfacing SAP and .net applications.

You may also be interested in...

Comments and Discussions

Generalweb services Pin
yyyyyy8716-Oct-06 7:58
memberyyyyyy8716-Oct-06 7:58 
Generalopening database Pin
yyyyyy8725-Sep-06 6:05
memberyyyyyy8725-Sep-06 6:05 
Generalre:re: Looping Pin
yyyyyy8720-Sep-06 5:33
memberyyyyyy8720-Sep-06 5:33 
Generalre:Looping Pin
yyyyyy8720-Sep-06 4:46
memberyyyyyy8720-Sep-06 4:46 
Generallooping Pin
yyyyyy8719-Sep-06 12:31
memberyyyyyy8719-Sep-06 12:31 
GeneralRe: looping Pin
rader1919-Sep-06 13:12
memberrader1919-Sep-06 13:12 
GeneralRe: looping Pin
yyyyyy8719-Sep-06 18:41
memberyyyyyy8719-Sep-06 18:41 
GeneralRe: looping Pin
rader1920-Sep-06 0:41
memberrader1920-Sep-06 0:41 
No it would look something like

For i as integer = 0 to M14.count -1
If M14(i).Success Then
RemoveNonDigits = r1.replace(M14(i).ToString,"")
If RemoveNonDigits <> "" Then
Dim m15 as Match = r13.Match(RemoveNonDigits)
If m15.Success then
'This will be each zip within the collection
'This is also where you could store the values within a DB
'Failed Try a different one or track # of failures
'Failed Try a different one or track # of failures
'Failed Try a different one or track # of failures

I didnt try any of this code but I believe this will work for you.
QuestionAdding vb code to Getting Zip+4 from Pin
yyyyyy8714-Sep-06 7:27
memberyyyyyy8714-Sep-06 7:27 
Generalreq.ContentType appears 2x Pin
wdjyjvoxmmb27-Apr-06 11:26
memberwdjyjvoxmmb27-Apr-06 11:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151002.1 | Last Updated 2 Nov 2005
Article Copyright 2005 by Ryan Rader
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid