Complicated email parse or text extraction and database insertion

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • code_worthy@bellsouth.net

    #1

    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.

Working...