Complicated email parse or text extraction and database insertion

Discussion in 'Perl Misc' started by code_worthy@bellsouth.net, Aug 15, 2005.

  1. Guest

    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.....Address.....City.....State.....Zip.....Identification
    Number.....Company
    John Doe.....PO Box
    9999.....Somecity.....CA.....90210.....12345.....Perl N PHP Scripts
    Welcome

    - excert from email #4

    Name.........Address.........City.........State.....Zip.......Identification
    Number.....Company
    JOHN DOE.....PO BOX
    9999.....SOMECITY.....CA........90210.....12345.....................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, 2005
    #1
    1. Advertising

  2. wrote:
    > 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?


    No.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
    Gunnar Hjalmarsson, Aug 15, 2005
    #2
    1. Advertising

  3. Matt Garrish Guest

    <> wrote in message
    news:...
    >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.
    >


    You're asking to find patterns where there are none (or you haven't looked
    hard enough yet to distinguish them). The two options that spring to mind
    are: 1) to write a script that can process the most common formats and use
    it to batch process as many emails as you can; and/or 2) clean up the data
    manually first (e.g., convert to xml).

    Matt
    Matt Garrish, Aug 16, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Seelan Rajagopal

    Email Address Extraction

    Seelan Rajagopal, Oct 17, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    315
    Seelan Rajagopal
    Oct 17, 2003
  2. Vince
    Replies:
    5
    Views:
    699
    Jeff Flinn
    Jun 28, 2005
  3. Christopher

    insertion, extraction, and streams

    Christopher, Jan 28, 2008, in forum: C++
    Replies:
    1
    Views:
    328
    Alf P. Steinbach
    Jan 28, 2008
  4. Replies:
    0
    Views:
    1,023
  5. Morris.C

    Email Address Insertion.

    Morris.C, Oct 10, 2005, in forum: Javascript
    Replies:
    3
    Views:
    72
    Randy Webb
    Oct 10, 2005
Loading...

Share This Page