I have the following regular expression:
^(MIN|MAX|SUM|AVERAGE):[(\\d+(\\.\\d+)?), ]+$
The rule I am attempting to implement should allow only for strings of the following format:
OPERATION: (comma separated list of integers or real numbers)
For example the following must be allowed:
MIN: 7, 89.7, 67
AVERAGE: 67.9, 89, 9
However, it accepts input of the form
MAX: ,
How can I avoid having blank spaces on either side of the comma to be accepted?