Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NET
How to find candidate email Id from a resume (word or pdf file) in asp.net during bulk upload...I am able to extract the email ids..But how to get exactly the candidate email id from a CV...
Posted 2-Feb-13 6:36am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
You can define the email pattern by using the RegEx then you can find the email address in doc.
 
Please refer below URL
http://www.codegain.com/articles/officedev/howto/how-to-extract-email-address-from-the-word-doc-using-c-sharp.aspx[^]
  Permalink  
Comments
Abhinav S at 2-Feb-13 13:14pm
   
Neat link.
Korathu 2 at 3-Feb-13 0:11am
   
Email Ids already extracted.But I wish to get the candidate email id alone from a resume..How can one get exactly that if there are multiple email ids in the resume ...
Korathu 2 at 3-Feb-13 0:15am
   
I mean how to extract email ids from the word or pdf(resume) file)...I am able to extract..But if there are multiple email ids how can one get the exact candidate email id....Actualy i wish to insert only the candidate email id and filename from the resumes into database during bulk upload...
Edo Tzumer at 3-Feb-13 1:20am
   
Then you need a known pattern of the CV in order to avoid other emails, like of a company etc. Otherwise, you can't be sure which email is the candidate.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

try this code...it is in following way..it possible using Regx...
1.Map your resume folder.
2.Fect all file in FileInfo[].
3.Retrive using for
4.read file using reader
5.Give email patter.
6.pass that data to regx match method in for loop...
 
StreamReader reader;
        int openIndex;
        string resume_data;
 
 string pattern = @"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*";
 
        DirectoryInfo di = new DirectoryInfo(Server.MapPath("~/resumes"));
        FileInfo[] rgFiles = di.GetFiles("*.doc");
        foreach (FileInfo fi in rgFiles)
        {
            
            resume_data = "";
            reader = new StreamReader(fi.FullName);
            resume_data = reader.ReadToEnd();
            reader.Close();
 
	foreach (Match m in Regex.Matches(resume_data , pattern))
            {
                txtEmailds.Text = txtEmailds.Text + "  " + m.Value;
            }
	}
...try as demo..it is working on my side ...try by implementing your logic as per ur requirements....
also search for "Regx class in c#.net" on Google...study it...
go through following link...
http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.matches.aspx[^]
....hope it will help u
  Permalink  
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 838
1 OriginalGriff 461
2 Tadit Dash 355
3 sanket saxena 329
4 Peter Leow 228
0 Sergey Alexandrovich Kryukov 11,990
1 OriginalGriff 7,349
2 Peter Leow 5,003
3 Abhinav S 4,003
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web03 | 2.8.140421.2 | Last Updated 3 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid