I want to create a regular expression pattern for entering a number. When the user enters numbers, the comma automatically enters a number, for example, 1.424 or 23.232. This works fine with regex pattern
/^[0-9.,]*$/
But the problem is that this pattern allowed a dot (.) Between numbers. I want to make a regex expression, as the input may allow .00 to go to the end of numbers not between numbers. But .00 is also optional. The allowed number formats are below:
123312131256457.00
1233121312564
9,223,372
Invalid number formats below:
34.343455.3434
34353...
I spend the lost time on the same, but do not get any solution. Please share your ideas. Thanks in advance.
source
share