That's what contain is for.
Code:
if(containi(servername, "HNS.RETRY.LV")
{
//do something
}
Also, i just looked at ur full code, and I'm just wondering, if you're calling the task every 5 seconds when they are put in the server, and their name is w/e (HNS.RETRY.LV) or w/e, it will keep stopping and starting the demo over and over and over again won't it?