The ? symbol serves a number of purposes in PCRE. The quantifer
minimizer usage is the one I'm currious about. Specifically, the
output from a test script isn't what I'm expecting, and I'm wondering
why.
Here's the script:
<?
echo preg_replace('#.*?b#','','aabbc');
?>
Based on my understanding of the quantifer minimizer, the output should
be bc. However, running this results in c being outputted. As such, I
guess I'm just not understanding what ? as a quantifer minimizer is
supposed to do. Could someone explain it to me?