Im trying to use a regular expression to validate strings like:
The pattern allows a percentage of 100,00 or a 1 or 2 digit number (2-digit not starting with 0) optionally followed by a comma and 2 digits.
See Pattern Demo for matching, explanation, and efficiency.
My pattern uses quantifiers on repeated characters to improve performance.
It doesn't use escaping slashes on commas -- they're not necessary.
It doesn't use more than one capture group, following the OP's pattern design.