做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

.NET讀取所有目錄下文件正則匹配文本電子郵件

來源:懂視網 責編:小采 時間:2020-11-27 22:44:48
文檔

.NET讀取所有目錄下文件正則匹配文本電子郵件

.NET讀取所有目錄下文件正則匹配文本電子郵件: 代碼如下:using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Text.RegularExpressions; namespace Test { class FiEmail { public static voi
推薦度:
導讀.NET讀取所有目錄下文件正則匹配文本電子郵件: 代碼如下:using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Text.RegularExpressions; namespace Test { class FiEmail { public static voi

代碼如下:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace Test
{
class FiEmail
{
public static void Main(string[] args) {
Console.WriteLine("請輸入內容路徑:");
string[] fs=Directory.GetFiles(args[0]);
if(fs!=null){
string jobsPattern=@"([\w-]+(\.\w+)*@([\w-]+\.)+\w{2,3})";
Regex rx = new Regex(jobsPattern,RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline );
foreach(string s in fs){
Console.WriteLine("匹配");
string asR=File.ReadAllText(s);
MatchCollection matches = rx.Matches(asR);
if(matches!=null && matches.Count>0) {
string argsP="";
for(int loopI=0;loopI<matches.Count;loopI++){
argsP+=(matches[loopI].Groups[0].Value)+Environment.NewLine ;
}
W(argsP.Trim(new char[]{'\n'}));
}
Console.WriteLine(s);
}
}
Console.ReadLine();
}
public static void W(string ids){
string paths=System.IO.Path.Combine(@"C:\Documents and Settings\Administrator\桌面\GC\","edel.txt");
using (System.IO.StreamWriter sr = new System.IO.StreamWriter(paths,true)){
sr.WriteLine(ids);
}
}
}
}

然后csc編譯,生成f.exe文件。然后就可以使用了。
里面牽扯到的技術要點:
1: C# 讀取文件夾下所有文件
2:C# 利用正則獲取文件中的郵址
3:C#文件寫入。
完畢。

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

.NET讀取所有目錄下文件正則匹配文本電子郵件

.NET讀取所有目錄下文件正則匹配文本電子郵件: 代碼如下:using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Text.RegularExpressions; namespace Test { class FiEmail { public static voi
推薦度:
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 平原县| 西城区| 尖扎县| 马关县| 临城县| 通州市| 洪洞县| 红原县| 巴彦县| 杨浦区| 兰考县| 南安市| 伊川县| 资中县| 丹凤县| 东阳市| 上饶市| 长沙县| 日照市| 昭平县| 湄潭县| 隆安县| 木里| 金平| 阿拉善左旗| 大兴区| 石首市| 抚顺市| 桑日县| 新化县| 玛纳斯县| 文水县| 咸阳市| 县级市| 阳信县| 奉化市| 壶关县| 略阳县| 天峨县| 赞皇县| 鹤庆县|