Hello i wanna extract the text between ().
For example :
(some text) some other text -> some text
(some) some other text -> some
(12345)
This will work
\((?=.{0,10}\)).+?\)
Regex Demo
This will also work
\((?=.{0,10}\))([^)]+)\)
Regex Demo
Regex Breakdown
\( #Match the bracket literally
(?=.{0,10}\)) #Lookahead to check there are between 0 to 10 characters till we encounter another )
([^)]+) #Match anything except )
\) #Match ) literally