I a using the current regex
/(?:^|[^\/\\])\[([\w\s-]*)($|\[)/ to match when user starts to enter chars and enter [some tex, to match this. When he closes it stops the match.
The problem is that i added condition in front, the
?: and if he enter
/[, i am not going to match it.
Well but, if he has something like
[text][bla - in this i will match the previous
] bracket and the string will be
][bla, but i don't want this. If he enters
[test] [car - this will match the space in front and will be
_ is space.