On Fri, 31 May 2002 12:32:29 +0100, you wrote:
>example of the contents of $file that might pass is:
>
>advance_racingx_14_4_29.pdf
>
>another might be, which would not pass is:
>
>advance_fork10_3_4_11.pdf
If you need it to be in that specific order, use the following:
if(preg_match("/advance.*racingx/",$string)) {
//do stuff
}
If the order doesn't matter, do this:
if(preg_match("/advance/",$string) && preg_match("/racingx/",$string))
{
//do stuff
}
There may be some more efficient/elegant ways to do this, but the
above should yield the results you are looking for.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php