As the title says, I cant figure out how to match text inside a nested parenthesis (only in nested parenthesis). E.g
I have this text Hi my (name is (Jhon) and(i dont) know how (to)match) this
.
The text I need to match is Jhon
, i dont
and to
.
But text like this one hi i have (a parenthesis)
should not match anything
Every answer i've seen until now uses recursive regex but I can not use a recursive regex in js and also I dont need a dinamic nested level identifier, just the text (whatever text) is inside the second parenthesis. ((this text))
I've tried (with no success) this {({([^{}])*})*}
This is not a dupe since The guy at the other question just ask for a single parenthesis....