javascript check if string contains regex