Conversation

This Tweet was deleted by the Tweet author. Learn more
Replying to
Try a regex like \([^\(\)]*?(n)[^\(\)]*?\) which should capture the smallest nested span of brackets that has an n inside. Might require running multiple times if nesting is possible. solution ignores nesting and may return cases with imbalanced parenthesis
1