|
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
Navigation:
[Reply to this message]
|