this pattern will not accept open square bracket separately ([) and close square brackets separately (]).
However when used together like this  with some characters in between it accepts. But with this i should also accept nested brackets to [212212] too. Is this possible in yang?
Note:  - should NOT be accepted
2122212[ - should NOT be accepted
129] not be accepted
the parenthesis should get matched and some characters should be present in between it…