If you would like to make sure that your search string is an isolated substring, not a prefix or a suffix of a larger substring, you can use regular expressions. For example, to see if a string contains a5 but not a52 or xa5, you can do this:
if (Regex.Matches(input, "\\ba5\\b").Count > 0) ...
Here is an example:
Console.WriteLine(Regex.Matches("hello a5 world", "\\ba5\\b").Count > 0); // True
Console.WriteLine(Regex.Matches("hello a55 world", "\\ba5\\b").Count > 0); // False
Console.WriteLine(Regex.Matches("hello xa5 world", "\\ba5\\b").Count > 0); // False
Here is a demo on ideone.
Regex is versatile enough to let you adjust the expression to your needs: you can use positive and negative lookahead/lookbehind. For example, if you need to make sure that 5 is not followed by another digit, you can write "a5(?!\\d)".