regex: Match atleast one character between two other characters

327 Views Asked by At

I currently use a regex

\\\[(.*)\\\]

so if I would try to match [] it will work. But what I want is so it requires at a minimum one character between [ and ] to match my regex, but how?

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

Before matching (.*). Do a match on [^]] to match something other than the closing ].