I am writing a RegEx to use on input fields. The purpose of this is letting user enter only digits and nothing else (even dot and comma are disallowed). Here is my code so far:
RegExp = new RegExp(/^[0-9]$/); This however still lets the user type in dots and commas. Which change I should make to get only digits?