Results 1 to 11 of 11

Thread: A function to get the specific part of a text

Threaded View

  1. #1

    Thread Starter
    Addicted Member kill_bill_gates's Avatar
    Join Date
    Oct 2004
    Posts
    222

    Post A function to get the specific part of a text

    I hope it will be useful to someone somehow(i found it practical). It gets the specific part in a text between the begining and the ending strings;
    VB Code:
    1. 'In a module type the following:
    2.  
    3. Function Between(Begining As String, Ending As String, TextToLookIn As String)
    4. Dim Be As String, En As String, TTLI As String
    5. Be = Begining
    6. En = Ending
    7. TTLI = TextToLookIn
    8. TTLI = Right(TTLI, Len(TTLI) - (InStr(1, TTLI, Be) + Len(Be) - 1))
    9. TTLI = Left(TTLI, InStr(1, TTLI, En) - 1)
    10. Between = TTLI
    11. End Function

    Hope it will be useful. If u think its not useful plz pm me.
    Last edited by kill_bill_gates; Dec 21st, 2004 at 02:39 PM.
    "Quis custodiet ipsos custodes?"
    Juvenal
    Mete the Hun wanted to live in peace with the Chinese. So he gave the Chinese Emperor his favorite horse, best swords in his armory, and lots of other cool stuff. But then the Chinese Emperor asked for one thing. A useless land through the north. It was a small, useless, unproductive, uninhabited piece of land. But Mete the Hun's answer was certain:
    I gave you horses, weapons and much more which belonged to me. But the lands are not mine, it's my nation's and I'm ready to fight, kill and die for just an inch my country
    -=Joey Jordison R0CKS!! =-

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