I'm using regex to validate if the value enter by user is a valid one.
string value = "500,21";
bool is_valid = Regex.IsMatch(value, "/^[0-9]+([,.][0-9]{2,2})?$/");
This piece of code should accept values like:
500.21
500,21
Yet it gives error saying that it ain't a valid value.
However, when using websites like https://www.regextester.com/ or https://regex101.com/ my regex works perfectly as you can see in here https://regex101.com/r/s6Cl9I/1