First things first: What do you hope to achieve by fitting it all into a single regular expression? The usual results of that are things like puzzling the humans (including yourself months from now) who ultimately have to decipher your code, and causing the regex engine to wander back and forth through your string a lot (which it's happy to do, but not necessarily very efficient at.) If it's logical from the standpoint of reading and maintaining the code to use 2 regexes, use 2 regexes.
Also, if your data is in a standard markup language, you may well be happier using a library to parse it, rather than hand-rolling a regex to do it.
In reply to Re: Regex Nested Matching
by ssandv
in thread Regex Nested Matching
by Rodster001
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |