I have the input string below:
[text1][text2][text3]...[textN]
and I want to apply the following validation rule using regular expression:
The
]
and[
cannot be included in other[]
.
For example, the next input strings are not correct:
[test1][test2[][test3]
[test1][test2]][test3]
[test1][test2[lol][test3]
[test1][test2]lol][test3]
I need to validate the input string because I am going to split it on []
groups (again using regular expression).