[thelist] Parsing text (ASP)

Tab Alleman talleman at autobex.com
Wed Apr 4 12:30:13 CDT 2001


ah.... :)

you create a variable and start it at 1.. say we call it "index"

when you're looking for point "a" (the beginning of the tag) do this:

(for img tags)
a = Instr(index, TheString, "<img")
z = Instr(a, TheString, ">")
(do the replace)
index = z + 1
loop back

you DO know about that first optional argument to the Instr() function,
right?  well you do now.  :)

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of J J
Sent: Wednesday, April 04, 2001 12:35 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] Parsing text (ASP)


Exactly!  Where I'm stuck is I think I can find the
first one, but then I'm not exactly sure how to go
from there, then find the Z instance, then stop,
replace, then continue/start over.  :)

Any chance you've got an ASP capable example or know
where to look to find the answer?  MS Scripting docs
are horrible.


--- Tab Alleman <talleman at autobex.com> wrote:
> 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
>

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list