On Thursday, April 11, 2002, at 05:59 AM, jas wrote:
> Is this a correct string to show only files that look like so:
> *_2222.jpg
> if ($file_names != "." && $file_names !=".." &&
> ereg('(^[0-1231]$).jpg$',$file_name))
> Any help would be great.
preg_match(/^_[0-9]{4,4}\.jpg$/, $file_name) should match any string
that starts with an underscore, is followed by exactly four digits, and
then a ".jpg". It will not match anything but this exact string.
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php