would suggest "/(\r\n|\r|\n)+/" especially if the input is from a
browser that could be mac, or windows.. :)
--
===
Michael J. Ryan - tracker1[*at*]theroughnecks.com
Roughneck BBS: http://www.theroughnecks.net telnet://theroug
$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
--
===
Mic
$var = preg_replace("/[\r\n]+/","\n",$var);
"Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> neither worked. any other suggestions?
>
>
> "Bb" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > replace that w
neither worked. any other suggestions?
"Bb" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> replace that with
> $var = preg_replace("/\n+/","\n",$var);
>
> "Bb" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > $var = pre
replace that with
$var = preg_replace("/\n+/","\n",$var);
"Bb" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> $var = preg_replace("/\n*/","\n",$var);
> "Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Is
$var = preg_replace("/\n*/","\n",$var);
"Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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 b
6 matches
Mail list logo