regex instead of string comparison