۲۸-مرداد-۱۳۹۲, ۲۰:۲۶:۳۸
جستجو یک رشته در یک فایل متنی
کد:
bool searchtextfile(string fileadd, string regMatch)
{
bool find = false;
StreamReader testTxt = new StreamReader(fileadd);
string allRead = testTxt.ReadToEnd();
testTxt.Close();
if (Regex.IsMatch(allRead, regMatch))
{
find = true;
}
else
{
find = false;
}
}