I would like to know if we can handle specific input like the following examples using pattern:
[1] or [1,2]
so basically brackets with a number or if there are more numbers then only comma allowed as a separator.
Tried [(\d+(\s*,?))+] as stated below but it doesn't work.