Re: String?
| From: | Erik Price | Date: | Wed, 10 Apr 2002 22:13:37 +0000 |
| Subject: | Re: String? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92463@lists.php.net to get a copy of this message | ||
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 pricee@hhbrown.com