On Thu, 7 Aug 2008 15:00:13 +0000 (UTC), Balance wrote:
> I need to convert this:
>
> <a href="
http://www.cnn.com"><img
> src="
http://some.domain.net/images/test1.gif"
width="143" height="107"
> hspace="3" vspace="3" border="0"
id="Content1"></a>
>
> to this:
> *Content1*
>
> Basically, use the value of the ID attribute and
encapsulate with asterisks.
> The kicker is that the href and img src can be anything,
the values posted
> here are just placeholders.
Is it the "the value of the ID attribute and encapsulate with
asterisks" or
"the value of the ID attribute OF THE <img> tag which
is within a <a> tag,
and encapsulate with asterisks"?
Because those are two different things.
NB: a work in progress for the latter is:
^<a[^>]+?><img[^>]*?id="([^"]+?)"[^>]*?></a>$
That makes some assumptions about your requirements.
--
Adam