point taken, i was just illustrating *a* way to go... wrote an idea down in
about a minute.
note the 'try something like' rather then 'here is the only way to do this'
and yes, it matches 'foosrc'.. there other attributes on can put in an img
tag
but rather then get in a completely pointless flamewar about 'The Right
Thing", let's just advice Sparkle to use a module that's already written
rather then reinvent the wheel.
of course you'll agree that even the module will be using regular
expressions to parse the html.
thanks for pointing out the existance of said module tho
regards,
Jos Boumans
> On Fri, Jul 20, 2001 at 02:45:52PM +0200, Jos I. Boumans wrote:
> > ### $res->content is the return value of a LWP request
> > my @images = $res->content =~ |<img.+?src=\"?(.+?)\"|sig;
>
> Rather than go the broken regex route (in the above regex the begin quote
is
> optional, the end quote isn't; it doesn't handle single quotes, or no
> quotes; it matches '<img foosrc="') I would suggest using
> HTML::SimpleLinkExtor.
>
> I'm not trying to be insulting Jos, but simple regexes shouldn't be used
to
> parse HTML.
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]