in reply to Re^2: Non-greedy substitution
in thread Non-greedy substitution

If you're interested in seeing how the Regex engine steps through a string, you can load Regexp::Debugger. Alternatively, the first edition of Mastering Regular Expressions explains in-depth how Perls RE engine matches and compares that to other engines.