Close

Results 1 to 4 of 4
  1. #1
    DF VIP Member Speedlock's Avatar
    Join Date
    Dec 2002
    Location
    North West
    Posts
    368
    Thanks
    0
    Thanked:        0
    Karma Level
    281

    Default Script to extract email addresses from a file?

    In a nutshell, I have a 50Mb details.oab file (from an Exchange server) that I need to extract all the email addresses from and place in a .txt or .csv file.

    I was thinking that maybe a perl script would do the job but I don't have much perl experience so this kinda thing is beyond me.

    I tried to do this a little while ago using a perl script I found via Google but it crapped out part way through so I guess it didn't like some of the odd characters in the .oab file.

    Anyway, if there are any perl wizards out there who can help (or if you can think of another way to do this) then please let me know! :thumbs

    --Speedlock

  2. #2
    Argyll's Apprentice TwoPlAnKs's Avatar
    Join Date
    May 2003
    Location
    Aberdeenshire
    Posts
    5,191
    Thanks
    0
    Thanked:        0
    Karma Level
    620

    Default Re: Script to extract email addresses from a file?

    this sounds like somebody trying to harvest email addys to me..

    SPAMMER

    if you are not gonna do that then you would need some sort of string processing program, one that finds all words with an @ sign in them would more or less work.

    need to split the file into words then chose the ones with @ signs(this is in no specific language, except pseudo code)
    Code:
    while (!end of file) {
      line=line of file
      while(position [wont let me do a smaller than sign :( ] lenth of line) {
           oldpos=position
            position=location of first space after position
            word=line from oldpos to position
             if ("@" isin word) {
                 write word to a file
             }
        }
    }

    if you convert all that into the language of your choice then it would work fine


    you woudl want to tidy up the word finding bit cos it is a tad messy atm, would leave spaces all over the place, plus there might be words with @ in them that are not really email addys

    also addys might not be separated by a space, mabye make it detect all characters that are not allowed in email addys as being spaces

    a bit tricky in some ways

    TwoSheds

  3. #3
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    290

    Default Re: Script to extract email addresses from a file?


  4. #4
    DF VIP Member
    oE's Avatar
    Join Date
    Nov 2000
    Location
    Newcastle
    Posts
    2,357
    Thanks
    69
    Thanked:        112
    Karma Level
    388

    Default Re: Script to extract email addresses from a file?

    why not just import it into excel as a text file and save it out as a CSV.

    oE.

Similar Threads

  1. gta3 save file 4 u all (pc)
    By neilmachin in forum PC Gaming
    Replies: 6
    Last Post: 14th January 2003, 01:52 PM
  2. Wicked Flash File
    By Pegasus in forum The Dog and Duck
    Replies: 11
    Last Post: 13th November 2002, 11:46 PM
  3. T100 To T108 Flash File
    By BAZZO69 in forum Unlocking Questions & Solutions
    Replies: 7
    Last Post: 4th September 2002, 07:53 PM
  4. Online Web Email Services
    By wizer in forum The Dog and Duck
    Replies: 13
    Last Post: 4th September 2002, 04:41 PM
  5. RudeYute's Email...
    By RudeYute in forum Unlocking Questions & Solutions
    Replies: 2
    Last Post: 1st September 2002, 01:58 PM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •