This question and its answers here suggest that both:
It is possible to use regex to match nested patterns.
And that it is not possible, because nested patterns are not regular languages and therefore DFAs (which regex are) cannot recognize them.
Before reading an answer (https://stackoverflow.com/a/3851098/2876289) to the above question, I would always side with 2. Now however I'm not so sure.
Can '/(\((?>[^()]+|(?1))*\))/'
really match nested patterns?
That being asked - I tried the above in vim (and JavaScript) and it doesn't work. Though perhaps it needs to be converted to a different syntax. The answer quoting it has 9 upvotes.