This article argues that regular expressions cannot match nested structures because regexes are finite automatons.
He then offers a list of problems in which the answer states that the following cannot be solved using regexes:
- matching an XML element
- matching a C/VB/C# math expression
- matching a valid regex
Since 2 & 3 can conceivably contain brackets; this nesting is unsolvable for regexes. But why is it impossible to match an XML element ? (He didn't provide examples).