Hi Joe:
On Fri, Jul 19, 2002 at 12:50:53PM -0500, 'Joe Rice' wrote:
$answer = hello\na\np\np\nl\ne\n; /*from textarea in form*/
/* replace all whitespace and newlines with nothing */
$tempanswer = preg_replace(/\s*|\n*/,,$answer);
Easier:
$tempanswer = preg_replace('/\s/', '', $answer);
hello,
any regex gurus?
i'm trying to match words put into a textarea
that are in the form of a\np\np\l\e
or any combination of new lines in between, before
or after.
$answer = hello\na\np\np\nl\ne\n; /*from textarea in form*/
$word = apple;
$word =
try changing the +'s with *'s
+ = 1 or more
* = 0 or more
-Original Message-
From: Joe Rice [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 19, 2002 3:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] vertical word match
hello,
any regex gurus?
i'm trying to match words put into a textarea
3 matches
Mail list logo