I want to validate the string {233}{232}{112}{3232} with regex in java. I am using Pattern.compile("\\{([^\\}]*.?)\\}") but I'm not able to validate this string.
Here in the string, multiple ids are divided by the curly braces and the ID must be numeric.
Some test cases:
Test case 1: {122}{323} //true
Test case 2: {122}323} //false
Test case 3: {122323} //true
Test case 4: {122},{323} //false
Test case 5: {xx}{YY} //false
Can anyone help me on this? Your help will be really appreciated.