iMacdonald Patch for Preg Replace