It's plausible that putting the object's "content" method in a while loop has the effect of
resetting the regex engine's pointer back to the beginning of the string on each iteration.