How to search for a pattern within a string?
<p>I have a string which contains the following output</p>

<pre><code>login;windows
db;sql
audit;failure
</code></pre>

<p>how do I check if this string contains the word "audit;failure"?</p>

<p>I have use the following code  but was not successful:</p>

<pre><code> currLine = sr.ReadToEnd();
 string[] splited = Regex.Split(currLine, "~~~~~~~~~~~~~~");
 case1 = splited[0];
 string case1 = "";
 string pattern1 = "audit;failure";
 if (Regex.IsMatch(case1, pattern1)){
 console.writeline("success"!);
}
</code></pre>

<p>I must search through the variable <code>case1</code> and not the string currLine
thaks in advance! :D</p>
