javascript if string contains regex