[quote=“vitaLee”]Yes, lookaheads might help but the problem is they won’t capture.
The consequence of that will be if later you’d like to take advantage of other features like “select between brackets”, “remove brackets”, “go to opening/closing bracket” you’ll have problems with leftovers that were’t captured, etc…[/quote]
Yes, there will be a tradeoff. If you use lookaheads, “select between brackets” will grab the “()” brackets which may not be desirable. If you don’t use the lookaheads. BH will not match the “()”. The good news is I fixed the issue where BH would find the closing bracket twice, now it will just ignore it.
The tradeoff is a limitation of BH. The needed complexity of recursive bracket matching to overcome this I don’t think is worth it, but it could be a possibility in the future if it is really required, but I will push back on it for now.