javascript check string contains characters