I now have the highlighting of capture groups (regardless of nesting level) functional at myregextester.com, thanks to the PHP code snippet by 'vapoorize' posted here:
http://phpsnips.com/tempSnip.php?id=5
Seems like a simple enough solution once I saw the code, yet didn't seem so simple when I was struggling with attempts to solve it previously. Maybe this post will help someone else attempting the same.
If you are curious about the modified highlighting code that I use at the site, here it is the relevant code:
http://pastebin.com/f9bd03cb
The version I use at the site combines each named capture group with the unnamed capture group that follows it. In PHP when you name a capture group an unnamed capture group with the same contents is also created in the resulting array, regardless if you have any use for that unnamed capture group or not.