String manipulation with ereg_replace
| From: | Ian LeBlanc | Date: | Thu, 22 Feb 2001 16:26:40 +0000 |
| Subject: | String manipulation with ereg_replace | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-41176@lists.php.net to get a copy of this message | ||
I am working on a site that has over 1000 pages and all the images need to be made lower case in the HTML.
Here is what I have so far. Please someone tell me what I am doing wrong.
$contents="<img src=ThisOneReallyNeedsToBeAllLowercase.gif alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
$contents = EREG_REPLACE("([-_a-zA-Z0-9]+).gif",strtolower("\\0"),$contents);
Output of $contents needs to equal
<img src=thisonereallyneedstobealllowercase.gif alt=thisonereallyneedstobealllowercase.gif>
I have the top part of my script reading the whole DIR and only editing the HTML files so that part is taken care of
All I need it help with making the images tag all lower case.
Regards,
Ian LeBlanc
Web Development
Rask, Inc. - www.rask.com
Phone: (727) 517-2000
Fax: (727) 517-2001