preg_replace replaced with str_replace for compatibility with Windows.