Want a regex for NUMERIC(p,s) NUMERIC will always be there and I just want to check whether inside brackets my values are comma separated or not. For example NUMERIC(10,20) so my regex would also contain "NUMERIC(" and comma checking for numbers and ")"
I have tried for comma check but not able to get the NUMERIC with "(" and ")" in my regex.
I have tried with "^NUMERIC\([0-9]+(,[0-9]+)*"
public static void main(String[] args) {
String regex="^NUMERIC\\([0-9]+(,[0-9]+)*"
String v="NUMERIC(1,2)";
System.out.println(v.matches(regex));
}
The expected result is the regex which would give me true for any comma separated number value within "NUMERIC(" and ")"