Posted by Dave on 10/06/40 11:17
Kevin Morgan (kevin@nospammistever.co.uk) decided we needed to hear...
> I've written a script that extracts part of a remote web page for me to
> put into a mac dashboard widget. What I need to do is replace each:
>
> <a class='pollBoxA' href='http://www.foobar.com'> text goes here </a>
>
> with
>
> <span onclick=â€widget.openURL(â€=3Fhttp://www.foobar.com/â€=3F);â€> text goes
> here</span>.
>
Your best bet is probably using a regex. Check out some of the PHP
functions here http://www.php.net/manual/en/ref.pcre.php
You'll find some good examples and tutorial links here
http://www.regexplib.com/Default.aspx
<snip example output>
>
>
> How on earth can I do this?
>
> Thanks,
>
> Kev
>
>
--
Dave <dave@REMOVEbundook.com>
(Remove REMOVE for email address)
Navigation:
[Reply to this message]
|