Fixed preg_replace for php 5.3