[thelist] Parsing text (ASP)

Tab Alleman talleman at autobex.com
Wed Apr 4 11:13:43 CDT 2001

that's for sure, but I've had to do it, and I did something like this

<pseudo pseudo pseudo code>

Find the first instance of "<img"  Or "<a href"  and call it "a"
Starting from that point, find the first instance of ">".. call it "z"
Save a sub string from "a" to "z"
Do a replace() on the sub string
start from after "z" and do it again until there are no more instances of
"<img" or "<a href" left in the remainder of the string



-----Original Message-----

(ASP may not be the best tool for this. Okay, it isn't. But more details

> From: J J [mailto:squid_66 at yahoo.com]

> 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

More information about the thelist mailing list