473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Parsing an email to find a mailing address?

I have a very interesting request. A customer receives orders via email.
The email contains the shipping address, shipping method, email address
and phone number. This information is not all together, nor is it in the
same format in each email as the emails come from different order
houses.

The customer wants me to scan the email and pull the information out so
that it can be used to import into their shipping software.

I've been able to copy the body of the email to the windows clipboard
and then into a string variable in VB. But now the hard part, finding
the shipping address.

Has anyone done something like this? How do I recognize a shipping
address in a page full of text?

Some of the different variations on the address are:

Name: Name
Address: 123 Nowhere St
City/State/Zip: Glendale, CA 90000

or

Name
123 Nowhere St
Glendale, CA 90000

or

Name
123 Nowhere St
Glendale, California
90000 USA

or

Name: Name
Address: 123 Nowhere St
City: Glendale
State: ca
Country: usa
Zip: 90000


*** Sent via Developersdex http://www.developersdex.com ***
Feb 19 '07 #1
2 1588
Terry Olsen <to******@hotmail.comwrote in news:uQQgrdHVHHA.3592
@TK2MSFTNGP06.phx.gbl:
Has anyone done something like this? How do I recognize a shipping
address in a page full of text?
Is the e-mail address passed through the e-mail header? Can you extract it
there?

If not, you can use regular expressions to parse the email address.
Feb 20 '07 #2
Hi Terry

What you're basically trying to do is Information Extraction from free
text which is a common challenge/problem in the Natural Language
Processing/Machine Learning arena and is something that can be
incredibly complex due to the fact that it's a person adding these
addresses in the first place and therefore they could be added in
many, many different ways. If you're willing to go down that route
then I'd suggest doing a search on "Named Entity Recognition" and/or
Information Extraction / Natural Language Processing etc.

However, in your instance you state that the emails come from a number
of different order houses - if that's the case then it'd be a whole
lot easier if you could either agree a standard format for these
emails to use, or failing that, if the emails from each order house is
in the same format (but a different format to emails from other order
houses) then it'd be a whole lot simpler to get a sample of an email
from each different sender and work on parsing them one at a time with
regex or your particular weapon of choice.

Hope that helps
Martin

Feb 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: cfoley1970 | last post by:
I have an online directory of alumni from a high school that runs PHP with a MySql backend containing contact info, email addresses, etc. Some of the alumni have begun to complain about receiving...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
2
by: Nigi | last post by:
I've made a mysql database with php front end which, in part, contains mailing lists. I've used a mailto: link to create a new email with their names in the bcc: field. Unfortunatley their is a...
117
by: Steevo | last post by:
Any suggestions as to the best programs for cloaking email addresses? Many thanks -- Steevo
0
by: Li-fan Chen | last post by:
Hi, We work with email in a large CRM solution and one of the email-related tasks that has plagued us is our decision to make use of a 3rd-party local-sourcer to work on the parsing of inbound...
4
by: kang jia | last post by:
hi i am doing mailinglist currently. the code in my first page is like this : : <html> <head> <link rel="stylesheet" type="text/css" href="gallery.css" /> <script language="JavaScript"> ...
4
by: chris | last post by:
I need to maintain a list of subscribers to an email list for a "newsletter" that will be sent via a web form probably once a month. I anticipate low numbers--tens to maybe one hundred subscribers...
11
by: Bob Bedford | last post by:
Hi all, we have many people that have registered to our newsletter and we are getting every time more people who the email is unavailable. It's there any technique to detect such unavailable...
3
by: razjafry | last post by:
Hi Experts, I have two tables - tblContact and tblOrg Contact table has only one option of mailing address e.g address,city,postal code whereas Org table has two options - one simple address -...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.