It's not a bug.
It happens because global matching is activated by default.
That means the engine tries to match the regex pattern as many times as possible.
With (.) the whole text is matched at first. Then the engine stands at the end of the text. And it tries to match the pattern again.
And it succeeds because . also matches "nothing".
But I'd prefer a simple "Format value" action is for this task anyway.