regex instead of string comparision