从C#中的文本文件中获取电话号码和地址 [英] Get phone number and address from text file in C#
本文介绍了从C#中的文本文件中获取电话号码和地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的文字如下:
I have text like:
Benkö Adrián• Perlacher Str. 32 • D-81532 München • 089/ 693 222 93 • 0174/ 301234243 •
info@benkö.de
Lebenslauf Benkö Adrián
Profil
Ergebnisorientierter, kommunikations- und umsetzungsstarker Diplom-Wirtschaftsingenieur
mit technischen, wirtschaftlichen und pädagogischen Qualifikationen, nachweisbaren
Führungs-qualitäten, Freude an unternehmerischen Herausforderungen und dem Willen, mit
vollem Einsatz, Engagement und Kreativität zum Unternehmenserfolg wesentlich und
nachhaltig beizutragen
所以如何从c#中获取该文本的电话号码和地址。
i在文件夹中有多个CV,所以我必须阅读它们并从中获取电子邮件,家庭住址并将其插入数据库。
我尝试过:
i尝试过正则表达式。
so how i can get phone number and address from that text in c#.
i have multiple CV's in folder so i have to read them and get email, home address from it and insert it into database.
What I have tried:
i have tried regular expressions.
推荐答案
我会做以下程序:
1)我会为特殊字符划线•。
2)如果拆分结果为5,则选择相应的值。
这是保持简单的方法。
希望它有所帮助。
祝你好运,
Carlos
I would do the following procedure:
1) I would split the line for the special character •.
2) If the split result is 5, then select the corresponding value.
This is a way to keep it simple.
Hope it helps.
Best regards,
Carlos
这篇关于从C#中的文本文件中获取电话号码和地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文