If you don't insist on regular expressions you can put a simple stack-based implementation:
using System.Linq;
...
private static IEnumerable<string> EnumerateEnclosed(string value) {
if (null == value)
yield break;
Stack<int> positions = new Stack<int>();
for (int i = 0; i < value.Length; ++i) {
char ch = value[i];
if (ch == '(')
positions.Push(i);
else if (ch == ')')
if (positions.Any()) {
int from = positions.Pop();
if (!positions.Any()) // <- outmost ")"
yield return value.Substring(from, i - from + 1);
}
}
}
Test:
// Let's combine both examples into one and elaborate it a bit further:
string test = "ABC (DEF (GHI) J(RT(123)L)KL) MNO (XXX1) DEF (XXX2) (XXX3)";
Console.WriteLine(string.Join(Environment.NewLine, EnumerateEnclosed(test)));
Outcome:
(DEF (GHI) J(RT(123)L)KL)
(XXX1)
(XXX2)
(XXX3)