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:[EMAIL PROTECTED]
Sent: Sunday, May 30, 2004 6:55 AM
To: [EMAIL PROTECTED]
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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to