You said:
The above expression matches, ABC: X=12,Y=1.79769313486232E+308". But it fails for "ABC: X=12,Y=1,79769313486232E+308"
Without any context, I'm not sure what the purpose of matching the above strings is, but I can see why it would be perfectly legitimate to match the first but not the second.
The format of 1.79769313486232E+308
is scientific notation for a very large number (the +308 basically means move the decimal point 308 places to the right). It is a legitimate number with the dot, but not with the comma.
It is true that some locales may use a comma as a decimal character rather than a dot, but scientific notation is standardised to use the dot, as are programming languages and other computer applications that would use numbers in this format, so it is legitimate to enforce it to be a dot and prevent the comma from being used.
To demonstrate why this is important, if the comma were to be allowed in this example, it would create an ambiguity as to where the value of Y
ended, because comma is already being used to show the end of the value of X
, using a comma instead of the point in Y
could make a computer think that the value of Y
is 1
, which would be incorrect.