10-31-2011، 02:52 PM
کد:
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;
}
}