As far as this answer shows (Can regular expressions be used to match nested patterns?) we cannot create a regex that can be used to match a infinitely nested pattern. But can we create a regex pattern that matches up to N nested occurences of that pattern?
For example how could we create a regex that matches comments like this up to 3 layers deep?
<*
Comment of depth 1 containing another comment
<*
That is a comment of depth 2 containing another comment
<*
Nanananananana BATMAN!!!
*>
*>
*>