to start with, sorry about the length of the title, i rewrote the title 3 times and that was the shortest one i felt was accurate enough to use.
now, to get down to it, like i said in the title, i am looking for a (hopefully simple) way for a program to find a block of text, and either replace it with some pre-specified text, or just delete the part of the block i don't want.
here is an example of the HTML code i want to edit:
1 2 3 4 5 6 7
|
<BLOCKQUOTE>Binds when equipped<BR />
Back<BR />
33 Armor<BR />
Requires Level 45<BR />
Item Level 50<BR />
<BR />
</BLOCKQUOTE></DIV>
|
and the result i am trying to break it down to is just the div tag at the end, everything else in that block of code is stuff i want to delete.
i tried doing this manually, and worked for an hour or more, and barely scratched the surface of the number of these changes that i need to do.
i am hoping to find a way to make a program that looks for the text
<BLOCKQUOTE>
, and when an entry of this code is found, then it enters the line number where the text was found.
then, i want it to search from the line where it found that first text for the following text
</BLOCKQUOTE>
. the only difference in the two peices of text is, the first is a beginning tag, and the second is an end tag.
so, the second text searched for has a "/" whereas the first does not.
another possibility for the second search could have it search for the text
</BLOCKQUOTE></DIV>
. either way should work, i think.
anyway, once it finds where the first entries of both pieces of code are, the code searched for, and everything inbetween the two, should be deleted, except for that
</DIV>
tag.
now, the problem i am having is, i am a bit out of practice in C++. and i can't quite seem to recall what classes would work for this.
i'd list what i have tried, but its a rather long list, and i need to finish writing this post sometime soon.