That worked the best from all other suggestions (fastest,) thanks a pantsfull. On Thu, May 06, 2004 at 09:44:53AM -0500, David Phillips wrote: > 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 > -- Andrei Bazhgin www.nan2d.com _______________________________________________ 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