01:53
To: Dave Carrera
Subject: Re: [PHP] Simple preg I think
Dave Carrera
You are right!
$str= "asdf./test";
echo preg_match("/\.\//", $str ,$arr); //print 1
print_r($arr);
=== 2004-05-30 11:55:00 您在来信中写道:===
>Hi Lis
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.
2 matches
Mail list logo