This is where you can start using regular expressions.
You can try something like this:
string mySearchPattern = @"$http://(\w+\.?)thedomain\.com^";
if(Regex.IsMatch(inputString, mySearchPattern))
{
}
What this regex (i hope) tells the regex engine is:
Does the input string start with http://, optionally contains one or more word characters followed by a dot and ends in thedomain.com?
I'm saying i hope this is what it does because i don't have a lot of experience with regular expressions.
But even if this is not an exact solution, if you manage to tame even the basic capabilities of regular expressions, you'll never look back at string searches and replacements.
Try this link for a complete overview of using regular expressions:
www.regular-expressions.info.
Hope this helps,
Andrei