|
Posted by g0c on 11/14/05 17:29
"g0c" <REMOVEg0c@msn.com> wrote in message
news:dla9ra$19oe$1@fegnews.vip.hr...
> hi all,
> i really cannot find a simple exmaple for preg_match function
>
> i whiled the files in the directory ...
>
> $d = dir('.') or die($php_errormsg);
> while (false !== ($f = $d->read())) {
> if (is_file($d->path.'/'.$f)) {
> if (preg_match(match????,substr($f,3))) {
> // print '<option> ' . $f . '<option>';
> echo "$f\n";
> }
> }
> }
> $d->close();
>
> i want to include files begining with "tn_"
> what in the heck must stand in pattern position, i tried everything ,
> nothing worked
> i have actually 8 files starting with tn_* of course ...
>
> thanks
>
solved : thanks ... /me stupid
/tn.+/ is the solution
Navigation:
[Reply to this message]
|