Help parsing a textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmp13drc13
    New Member
    • Nov 2009
    • 1

    Help parsing a textbox

    Hello, what I need help with is probably simple for most of you fluent with vb.net, I have been learning for the last 6 months.
    What I am trying to do here is search a multi-line textbox that contains the source of a particular website.

    what I would like is something like this but i do not know how to right it like i need
    Code:
    Dim MyString, FirstWord, LastWord, MidWords As String
    MyString = "Mid Function Demo"   ' would be the textbox
    FirstWord = Mid(MyString, 1, 3)   ' Returns "Mid".
    LastWord = Mid(MyString, 14, 4)   ' Returns "Demo".
    MidWords = Mid(MyString, 5)   ' Returns "Function Demo".
    this function works fine only when you define len.

    what I need is a function that will do something like this,
    "note obviously interpreted code"
    Code:
    Dim text, A,B,C as string
    text = textbox1
    A = "<body>"
    B = "information between A and C being of variable len"
    C = "</body>"
    textbox2 = B
    I am quite sure you can figure out what i want from there,
    I do not want anything like,
    remove "<>?|\?()}{][" etc. please
    Last edited by Frinavale; Nov 26 '09, 07:49 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I don't know what you want?
    Have you considered using regular expressions?
    If you're dealing with HTML then have you considered using one of the XML tools that are part of the .NET framework to help you achieve whatever it is you want to achieve?

    Comment

    Working...