matching regular expressions with string
Posted: Tue Dec 18, 2007 3:28 am
I have used
preg_match("/$target/i", $file);
which returns many unwanted files
such as
if i am searching for file name test1.php it also returns test2.php.
so I tried to use preg_match_all like
preg_match_all("/$target/i", $file);
which returns nothing
What is wrong in this? In need of suggestions.
Thanks
preg_match("/$target/i", $file);
which returns many unwanted files
such as
if i am searching for file name test1.php it also returns test2.php.
so I tried to use preg_match_all like
preg_match_all("/$target/i", $file);
which returns nothing
What is wrong in this? In need of suggestions.
Thanks