473,657 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Complicated email parse or text extraction and database insertion

I am trying to strip some data out of numerous emails and place it in
my database. I know that this seems as if it has been done before.
But, this is a little different. First, the numerous emails all have a
set of data that needs to be extracted and inserted into the database.
Some of the data in the email is id, name, address, city, state, zip,
company, etc. The catch is that the date is formated and presented
differently in each email. Take into consideration the following email
examples:
- excert from email #1
ID:............ .. 12345
Name:.......... .. JOHN DOE
Address:....... .. PO BOX 9999
City:.......... .. Somecity
State:......... .. CA
Zip Code:........ 90210
=============== =============== =============== =============== ===

Company Information:

1.:-
Company Name:....... Perl N PHP Scripts Welcome

- excert from email #2
Full Name -- Doe, John
Address -- PO BOX 9999
City -- Somecity St -- California
Zip -- 90210
Company Name -- Perl N PHP Scripts Welcome
ID -- 12345

- excert from email #3
Name.....Addres s.....City..... State.....Zip.. ...Identificati on
Number.....Comp any
John Doe.....PO Box
9999.....Someci ty.....CA.....9 0210.....12345. ....Perl N PHP Scripts
Welcome

- excert from email #4

Name.........Ad dress.........C ity.........Sta te.....Zip..... ..Identificatio n
Number.....Comp any
JOHN DOE.....PO BOX
9999.....SOMECI TY.....CA...... ..90210.....123 45............. ........Perl
N PHP Scripts Welcome

Can anyone help me with either scripts that have already been
developed or suggestions on how to go about striping out the needed
information from emails with out knowing their format or order of the
data? THANKS IN ADVANCE.

Aug 15 '05 #1
0 1440

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

Similar topics

3
3415
by: Kangol kangoll | last post by:
hi, i've been trying to figure out how to make visual basic start extracting text at a certain line to when i tell it to stop. I am making trying to make a program where it extracts text from a text file and inserts it into a database. But right now i'm stuck at finding a way to code it so the text extraction doesn't start till after the second set of dashes, here is part of text file. I want to extract ACL ET AL SNIPELK 8-27-70-18 and so...
1
1674
by: chuck amadi | last post by:
Hi sorry to try and get someone to do my job but im at logger heads at the moment . I have been assigned a duty to abstract from a mail acoount (/var/spool/mail/Usersurvey) The email messages are encapsulated in xml I want to parse the data into a database. I have been programming with UnixMailbox Module and been able to view
0
1097
by: Steve Jorgensen | last post by:
I'm wondering if there's an approach to writing consistent code to read/write XML data in arbitrary order that I'm simply missing. It seems to be easy getting stuff -out- of a DOM via XPath, but it's much tougher building a DOM document in arbitrary order. Yes - I can get the parent context element first, using XPath, but then I build custom wrappers and helpers to simplify the building and adding fragments in the correct namespace,...
2
3775
by: chuck | last post by:
Hello, I am using the prototype.js http://prototype.conio.net library for a project and so wanted to use the Insertion function to replace text within a table. I want to simply replace what is within a <td> with the updated text, but I can only seem to add to whats there. for example <td id="textToReplace">Some text to replace</td> becomes <td id="textToReplace">Some text to replace text gets added on</td>
0
2296
by: Do Re Mi chel La Si Do | last post by:
Open-Office 2.0 bêta-2 français pour Windows (en fait, la 1.9.125 ) est sortie. Vous la trouverez là : http://oootranslation.services.openoffice.org/pub/OpenOffice.org/2.0beta2rc/OOo_2.0beta2_Win32Intel_install_fr.zip Je cite ce lien, car j'ai réussi à piloter Open-Office, depuis Python, avec PyWin32. Vous trouverez ci dessous le script expérimental (code "brut" et méchant ; mais c'est la faisabilité qui importe ici).
11
3602
by: hoopsho | last post by:
Hi Everyone, I am trying to write a program that does a few things very fast and with efficient use of memory... a) I need to parse a space-delimited file that is really large, upwards fo a million lines. b) I need to store the contents into a unique hash. c) I need to then sort the data on a specific field. d) I need to pull out certain fields and report them to the user.
2
2501
by: Vyz | last post by:
I am looking for a PDF to text script. I am working with multibyte language PDFs on Windows Xp. I need to batch convert them to text and feed into an encoding converter program Thanks for any help in this regard
2
1599
by: Terry Olsen | last post by:
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...
5
64620
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C++ programming. FYI Although I have called this article “How to Parse a File in C++”, we are actually mostly lexing a file which is the breaking down of a stream in to its component parts, disregarding the syntax that stream contains. Parsing is actually including the syntax in order to make...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.