RE: [PHP] Simple preg I think [SOLVED]

2004-05-30 Thread Dave Carrera
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

RE: [PHP] Simple preg I think

2004-05-30 Thread Larry Brown
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.