Use Regex In If Statement Javascript W3schools