Reply to Re: eregi and eregi replace

Your name:

Reply:


Posted by Jasen Betts on 02/15/06 11:40

On 2006-02-14, Jim Michaels <jmichae3@nospam.yahoo.com> wrote:
>
> "Jim Michaels" <jmichae3@nospam.yahoo.com> wrote in message
> news:27-dnTtIL5L0NXTenZ2dnUVZ_vmdnZ2d@comcast.com...
>>
>> Be aware that . matches any character: escape it with a \ if you want a
>> dot.
>> Also, the range A-z includes [\]^_` along the way. were you trying for
>> this?
>> eregi('(=")(pics/)([0-9a-zA-Z_\-%/ ]+\.[jpgifpnJPGIFPN]{3})(")',$htmlsource,$imagesintext);
>
> can be further shortened:
> eregi('(=")(pics/)([\d\w_\-%/ ]+\.[jpgifpnJPGIFPN]{3})(")',$htmlsource,$imagesintext);

yeah, both are equally non-functional.


I think what Jim intended was

eregi('(=")(pics/)([0-9A-Z_/\ %-]+\.[fgijnp]{3})(")'
,$htmlsource
,$imagesintext);


But thare's no law that images must have filenames that match that.

This: <img src="randompic.001.php">
is valid if the PHP sets content-type and emits a correctly formed inage...


Bye.
Jasen

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация