In article <[EMAIL PROTECTED]>, Bruce wrote:
> $file = "tttt.txt";
> 
> ereg("(\.)([a-z0-9]{3,5})$", $file, $regs);
> echo " ww = ".$regs. "<br><br>";
> 
> 
> i'm trying to figure out how to get the portion of the regex that's the
> "extension" of the file. my understanding of the docs, says that the
> "extension" should be in the $reg array....
> 
> any ideas/comments on where my mistake is would be appreciated...

Will it work with 123.123.txt ?

If you have a look at the file functions in the manual, you'll find much
better solutions like pathinfo();


-- 
Tim Van Wassenhove <http://home.mysth.be/~timvw>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to