PHP Preg_replace Segfault Fixed Sep 28th, 2007 | Comments So I finally fixed the issue here, by replacing Segfaults1 2 <?php // For syntax highlighting $data = preg_replace('/ '. trim($attrib) .'=(\w|\s|=|-|:|;|\/|\.|\?|&|,|#|!|\(|\)|\+|{|})*/i', '', $data); with Doesn’t segfault1 2 <?php // For syntax highlighting $data = preg_replace('/ '. trim($attrib) .'=[\w\s=:;\/.?&,#!()\+{}-]*/i', '', $data); Back to work I go.