I know this (or similar) has been asked a hundred times - but I really need help now :D The strings the regex should match.
Note: n
is in the range of INTEGER_MIN - INTEGER_MAX
{number}
{number(1-n)}
{number(1-n,-n-n)}
{number(1-n,-n-n,0-n)}
If the pattern matches it should result in 3 seperate capture groups, with this results. All groups should be optional - so that if request in for example Java they return null.
1: 1-n
2: -n-n
3: 0-n
What I've tried:
\{number(?:\(([1-9])(?:(?:,)([0-9])){0,2}\))?\}
This obviously isn't right and is only containing 2 groups (m.groupCount()
)