如何在批量上传期间从asp.net的简历(word或pdf文件)中查找候选人电子邮件ID [英] How to find candidate email Id from a resume (word or pdf file) in asp.net during bulk upload
问题描述
如何在批量上传期间从asp.net中的简历(word或pdf文件)中找到候选电子邮件ID ...我能够提取电子邮件ID。但是如何从简历中准确获取候选电子邮件ID ...
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...
推荐答案
您好,
您可以使用RegEx定义电子邮件模式,然后您可以在doc中找到电子邮件地址。
请参考以下网址
http://www.codegain.com/articles/officedev/howto/how-to-extract-email- address-from-the-word-doc-using-c-sharp.aspx [ ^ ]
试试这个代码...它是以下方式..可能使用Regx ...
1.映射你的简历文件夹。
2.Fect FileInfo []中的所有文件
3.Retrive使用
4.read文件使用阅读器
5.给电子邮件模式。
6.pass该数据与regx匹配for循环中的方法...
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;
}
}
...尝试演示..我正在努力...尝试按照你的方式实施你的逻辑要求....
还在Google上搜索c#.net中的Regx类...研究它......
通过以下链接... < br $>
http://msdn.microsoft.com /en-us/library/system.text.regularexpressions.regex.matches.aspx [ ^ ]
....希望它能帮到你
...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
这篇关于如何在批量上传期间从asp.net的简历(word或pdf文件)中查找候选人电子邮件ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!