regex: Match atleast one character between two other characters

289 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 answers

0
Mike Wodarczyk On BEST ANSWER

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