mit.
$data[txt] = preg_replace('`[\r\n]{2,}`',"\n",$data[txt]);
De: Merlin Morgenstern
Para: php-general@lists.php.net
Enviado: mié,14 octubre, 2009 12:17
Asunto: [PHP] regex for multiple line breakes
Hi there,
I am trying to remove multipl
y Sheridan
Para: Merlin Morgenstern
CC: php-general@lists.php.net
Enviado: mié,14 octubre, 2009 12:44
Asunto: Re: [PHP] regex for multiple line breakes
On Wed, 2009-10-14 at 12:42 +0200, Merlin Morgenstern wrote:
> That sounds very logical but does not work unfortunatelly.
> The result
7;s a range, first number means min matches, second max
> > matches. Omitting last number means no max limit.
> >
> > $data[txt] = preg_replace('`[\r\n]{2,}`',"\n",$data[txt]);
> >
> >
> >
> > ____________
>
De: Merlin Morgenstern
Para: php-general@lists.php.net
Enviado: mié,14 octubre, 2009 12:17
Asunto: [PHP] regex for multiple line breakes
Hi there,
I am trying to remove multiple linebreakes from a textarea input. Spammers tend
to insert multiple line breakes. The prob
De: Merlin Morgenstern
Para: php-general@lists.php.net
Enviado: mié,14 octubre, 2009 12:17
Asunto: [PHP] regex for multiple line breakes
Hi there,
I am trying to remove multiple linebreakes from a textarea input. Spammers tend
to insert multiple line breakes. The
Hi there,
I am trying to remove multiple linebreakes from a textarea input.
Spammers tend to insert multiple line breakes. The problem is, that I
want to allow 2 line breaks so basic formating should be allowed.
I am doing this by regex:
$data[txt] = preg_replace('`[\r\n]+`',"\n",$data[txt]);
6 matches
Mail list logo