This works fine on one server, but not on another server (both use 4.1.3). The pattern does not appear to be being identified on the new server, so the replacement text is not being added to the output.
It seems about the only thing you aren't showing are E_NOTICE [php.net] errors. I'm not sure what type of error would be thrown if the POSIX regular expressions [php.net] weren't configured in your second installation. You could always run the phpinfo() [php.net] function to have a look at the Configure Command on your server to see if the extension has been loaded.
But, if str_replace is working for you, good enough ;)