Results 1 to 2 of 2

Thread: Ok, so how is this done anyways?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    99
    how can I find everything to the right of THE LAST ":" in a string??

    i.e.

    yo:blah:what:why

    get "why" even if you dont know what is to the right or left of the ":"s...

    thanks
    ___________________________
    Chris

  2. #2
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    try this
    Code:
    Dim i As Integer
    Dim MyStr As String
    Dim MyNewStr As String
    MyStr = "This Message:Message 2:Hello"
    i = InStrRev(MyStr, ":") + 1
    MyNewStr = Mid(MyStr, i)
    MsgBox MyNewStr
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

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