-
string manipulation
hey all, i did some searching but couldn't find an answer to this one.
I come from a C background as far as string manipulation is concerned, and that was fairly easy. My question is, is there something like a CharAt(x) function in VB? Here's my problem.
Code:
<font size=2 face=verdana><b>06/23/02 03:51 PM, Bob R.</b></font>
<table width=650><font size=2 face=verdana>ACCT. xxxxxxxxx - SECTION 10316 PH 2 -
THIS MEMBER'S DCI REMOTE METER READING DEVICE
CALLED IN POWER INTERRUPTION. NO OTHER CALLS
OR ANY INDICATIONS OF PROBLEMS.</font><br>
</table>
Entries like this are made everyday by a program I wrote in VB and they are posted to our internal site. To make an edit to these entries, they currently have to edit the HTML source which is a bit confusing for those persons.
I need to read the line (ie. 06/23/02 03:51 PM, Bob R.) and then the details and put them all in different text boxes like I had them when the entries were made. How do I look in a line for say... the ", " and then put the "Bob R." in a text box? Same with the year, date, etc.
Then I guess I'm not real sure how to overwrite JUST that entry in my html file since there could be several of these types of entries per html file.
any ideas?
-
hi
If the entries are going to remian the same then you can use something like.
[code]
instr(strHTML,"<B>") + 3 gives you the position of the date 06/03...
and so on.
-
ok, now the next problem is that the name in that first line of HTML code is variable. How do I get the characters from the comma to the "<"?
And the question remains about how to update the HTML file. There could be several of these same entries! How do I just update one of them and leave the rest of them alone?
-
ok, i got the variable part using the Len() function.
But I still don't understand how to overwrite part of a file?