[thelist] Parsing text (ASP)

J J squid_66 at yahoo.com
Wed Apr 4 11:01:18 CDT 2001

I'm trying to find a good way to search through
returned text and find all IMG SRC and HREFs, then
look within those strings and replace certain text.

So, let's say I return text that has:
"blah blah yadda <IMG SRC="coolfun.gif"> and then blah
<a href="test.asp?cool=funtest">yadda</a> because that
would be fun to do."

And I want to replace the word FUN with HAPPY so it
"blah blah yadda <IMG SRC="coolHAPPY.gif"> and then
blah <a href="test.asp?cool=HAPPYtest">yadda</a>
becasue that would be fun to do." 

I know how to do a replace on a select string, but how
do I find these strings within a set of text like
above, then look between the tags?  

Because I wouldn't want to replace the word FUN in the
regular sentence, just in IMG SRC and HREF tags.  I'm

Thanks in advance for any tips or suggestions! 

Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 

More information about the thelist mailing list