Getting matched attributes

Getting matched attributes


Hi All,
I have a html source in which i would like to find all the 'width'
attributes and replace their values .
This html source can vary , so i cant look for width attribute on a
particular tag . How can i achieve this.
e.g : examples of sources
html source 1 :
<object width="510" height="295"><param name="movie" value="http://
www.hulu.com/embed/JK9tdpQPim1o-aujnb9cOA"></param><embed src="http://
www.hulu.com/embed/JK9tdpQPim1o-aujnb9cOA" type="application/x-
shockwave-flash" width="510" height="295"></embed></object>
or
html source 2 :
<div style="width:426px"><embed src="http://apps.rockyou.com/
rockyou.swf?instanceid=110616594&ver=102906" quality="high"
salign="lt" width="426" height="320" wmode="transparent"
name="rockyou" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"/></
embed>
<a style="padding-right:1px;" target="_BLANK" href="http://
www.rockyou.com/?type=slideshow&refid=110616594"><img style="border:
0px;" src="http://apps.rockyou.com/link/logo.gif"></a><a
style="padding-right:1px;" target="_BLANK" href="http://
www.rockyou.com/slideshow_create.php?refid=110616594&source=cyo"><img
style="border:0px;" src="http://apps.rockyou.com/link/
create_own.gif"></a><a style="padding-right:1px;" target="_BLANK"
href="http://www.rockyou.com/show_my_gallery.php?
instanceid=110616594"><img style="border:0px;" src="http://
apps.rockyou.com/link/view_all.gif"></a><a target="_BLANK"
href="http://www.rockyou.com/link/link8.php"><img width="84"
style="border:0px" src="http://apps.rockyou.com/link/link8.gif"></a></
div>
Thanks
Haritha