> I don't think any regex, being a finite automaton, could handle nested
> strings properly.

Ignore this bit, it's false.