in reply to Re: left-non-greedy regex?
in thread left-non-greedy regex?

This is fairly easy using negative look-ahead and negative look-behind:
use English; @a = qw/abbabbbababba ababbabbba abbbabbaba/; foreach (@a) { print "$PREMATCH $MATCH $POSTMATCH\n" if /(?<!b)b(?!b)/ } abbabbba b abba a b abbabbba abbbabba b a

i.e: Only match a b if there is no b before or after it. Although this doesn't really have to do with what you were talking about in the root node, it is one of the easiest ways of doing it.