Results 1 to 4 of 4

Thread: string manipulation

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    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>
    &nbsp;&nbsp;&nbsp;&nbsp;<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?

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    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.

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    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?

  4. #4

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    ok, i got the variable part using the Len() function.

    But I still don't understand how to overwrite part of a file?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width