Andrei Bazhgin writes:
> I am actually using PHP (with PCRE extention enabled) to process user
> comments on a small project I am working on. I want to limit the user
> to have a maximum of one newline _per_ newline

while (strpos($x, "\n\n") !== false)
    $x = str_replace("\n\n", "\n", $x);

-- 
David Phillips <david at acz.org>
http://david.acz.org/


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list