If you want to use regular expressions in your code it is a good idea to learn how it works, because otherwise you will run into trouble if you need change the expression later on.
Here is a web site I usually go to when I need to learn more.
Regular Expressions Tutorial[
^]
It is also good to have a regex tool where you can test different expressions on a variety of input data. Here is a free tool I usually use:
http://sourceforge.net/projects/regextest/[
^]
To solve your problem I would create a regular expression that can match both strings
\ba test string\b
The word boundaries \b is used to make sure the words appear in the correct sequence.
The c# code will look something like this:
Regex regex = new Regex(@"\ba test string\b", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
if (regex.IsMatch(a) || regex.IsMatch(b))
{
}
This example is of course limited by the data you have given in your question.