Please help me make regular expression for positive decimal number with 0, 1 or 2 decimal places. It must allow comma and dot. For example it must allow:
0,0
What you've got so far seems unnecessarily complicated to me. How about just
/^\d+([.,]\d{0,2})?$/
This is correct for every test case in the OP except for:
0.0 0,00 0
I don't see why you'd reject these.