$strMine = preg.replace("/(\r\n|\r|\n)+/",$strMine,"\r\n\r\n");
or "\n\n" as the replace.. :) I use the (\r\n|\r|\n) to match against windows, unix, & mac line terminations... I usually replace with the windows \r\n -- ======================================================================= Michael J. Ryan - tracker1[*at*]theroughnecks.com Roughneck BBS: http://www.theroughnecks.net telnet://theroughnecks.net ======================================================================= Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email One program for aim/icq/yahoo/msn/irc - http://www.trillian.cc/ "Jason Caldwell" <[EMAIL PROTECTED]> wrote in message... > Is there an elegant way to remove excess blank lines from my form data? > > For example; if someone enters the following text and then press' the > Submit button: > > ---- > This is a some text > > > This is more text, and yet even more.... > ---- > > What I want to do is remove the excess white space and make it look like > this? > > ---- > This is a some text > > This is more text, and yet even more.... > ---- > > My users may press <enter> too many times and I want to ensure clean text > and formatting. > > Thanks. > Jason > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php