Possible Duplicate:
C#: finding instances of a string within a string
I want to get count of the 'if' keywords in an input , i have wrote this code,but not working at all
string pattern = "if" + "\\B";
also
string pattern = "\\B" + "if" + "\\B";
What pattern should am I use ?