javascript check if string contains certain characters