I need a regex that validates numbers, commas, and period it must contain numbers and if it contains a semicolon, have only one of them, and only once
1.1 - true
1,2 - true
2 - true
1..2 - false
1.2. - false
1.2.2 - false
2,3,2 - false
-2 - false
, 2 - false
2, - false
With this expression '/[^0-9,.]/g' it blocks anything that is not numbers or commas, but you can put as many times as you want (the dots and commas).