Fix regex bug caused in PHP 5.5