Results 1 to 6 of 6

Thread: RichTextBox: Loop Line by Line Looking for Criteria and Replace Certain Line

Threaded View

  1. #3
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: RichTextBox: Loop Line by Line Looking for Criteria and Replace Certain Line

    This smells like somebody is desperately trying to use an INI file in place of a database. This is a very poor idea.

    Even then I'm not sure where a RichTextBox makes sense as part of a proposed solution. That sounds really off-the-wall.

    However given these requirements (assuming an INI-format file is really involved here) this probably isn't as simple as removing duplicates. It sounds like the goal is to find duplicated numbers and assign new unique numbers to those "patients."


    I ginned up a dummy file to work with and did this using a RichTextBox. About the only value added by a RichTextBox was the ability to colorize things to see what is going on.


    Name:  sshot1.png
Views: 930
Size:  5.9 KB

    Lines with duplicate Patient numbers in red


    Name:  sshot2.png
Views: 796
Size:  6.1 KB

    First of each duplicate in blue, renumbered duplicates in green


    No attempt is made to sort the results. This kind of thing would be far better accomplished using a database instead of an INI file. But maybe I'm just making assumptions about the data that aren't true. We haven't been told much, after all.
    Attached Files Attached Files

Tags for this Thread

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