In this much upvoted question 12 years ago, it has been asked, how to extract the content of brackets e.g.
I want to find an answer on the internet [stackoverflow].
The wanted expression to extract the brackets and the content is
\[.*?\] # -> [stackoverflow]
while the
(?<=\[)(.*?)(?=\]) # -> stackoverflow
extracts the content only. I would like to match only those expression that are not longer than 10 characters.
My guess would something like
\[.*?\]{,100}
but that is not working. Where do I put the condition of the maximal length?