Results 1 to 3 of 3

Thread: [RESOLVED] vb6; parsing text to list listbox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2016
    Posts
    224

    Resolved [RESOLVED] vb6; parsing text to list listbox

    i solved it my self
    in case anyone need this here is code:

    List1.Clear
    Dim sInput As String
    sInput = Text1.Text
    Dim Item
    For Each Item In Split(sInput, "</option>")
    Item = Mid(Item, InStrRev(Item, ">") + 1)
    If Len(Item) Then List1.AddItem Item
    Next
    Last edited by geekmaro; Jul 5th, 2021 at 04:09 PM.

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,622

    Re: [RESOLVED] vb6; parsing text to list listbox

    Sam I am (as well as Confused at times).

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

    Re: [RESOLVED] vb6; parsing text to list listbox

    Smells like an accident waiting to happen.

    HTML is very loose and floppy. For example:

    </option >

    is perfectly legal, as is:

    </optionCRLF> and </optionTAB> and others.

    When he runs into one of those the wheels will come off. Data corruption, lost data, etc. You can never trust HTML as an input source.

    Very large and messy programs (browsers) have to deal with this, as do large and messy utilities that make attempts to clean up the dog's breakfast known as HTML. "HTML Tidy" is one of the older ones.

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