[javascript] Regex to check whether a string contains only numbers