RE: [PHP] Simple preg I think
| From: | Larry Brown | Date: | Wed, 05 Jan 2000 13:05:59 +0000 |
| Subject: | RE: [PHP] Simple preg I think | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187222@lists.php.net to get a copy of this message | ||
That works for me...
$testVal = "this is the ./command";
if(preg_match("/\.\//i", $testVal))
{
echo "hello";
}
This printed hello, then I removed the slash and it did not match and did
not print hello. Sounds like it is a logic problem, or the variable is not
arriving as you expected.
-----Original Message-----
From: Dave Carrera [mailto:dave@ephgroup.com]
Sent: Sunday, May 30, 2004 6:55 AM
To: php-general@lists.php.net
Subject: [PHP] Simple preg I think
Hi List,
How do I match an accordance of "./" in a string (without the quotes) ?
I have tried preg_match("/\.\//i", $str);
Which I thought would work , as per the manual, but no joy.
Any help or guidance is appreciated
Thank you in advance
Dave C
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php