[pmwiki-users] Dumb question... stripping returns?

Russell Bailey russell-pmwiki at saberpunk.net
Mon Aug 8 00:15:04 CDT 2005


I'd like to strip out extraneous carriage returns in user edits.  I'm
having a devil of a time getting the replace string right,  though.  I'm
pretty sure I'm making a simple error... anyone recognize it?

$new['text'] = str_replace("/[\n|\r]{2,}/", '\n', $new['text']);




More information about the pmwiki-users mailing list