in reply to Re^2: Using variables in RegEx
in thread Using variables in RegEx

I don't see how named references allow $sentenceCount++ to be executed in the replace expression.