Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Return specified portion of string

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,765
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Return specified portion of string
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Return specified portion of string - 1/23/2003 10:29:53 AM   
  bgeelan

 

Posts: 1
Score: 0
Joined: 1/23/2003
From:
Status: offline
Hi and thanks in advance for your help. The value of a string returned will have some junk in the beginning and junk after the portion of the string I want to grab... i.e. junkhere=stringIwant/morejunk

The two knowns are that there will always be the = sign, and the / How would i go about getting what is in between these two characters?
 
 
Post #: 1
 
 Re: Return specified portion of string - 8/21/2003 10:37:04 AM   
  vbwrangler

 

Posts: 3
Score: 0
Joined: 8/21/2003
From: USA
Status: offline
You will need to use the Mid(), InStr(), and the Len() functions putting them together as you would an algebraic expression. Perhaps also Left() and Right(). For example if "strYour" is your string:
Mid(strYour, InStr(strYour, "="), InStr(strYour, "/")-1)

vbwrangler@yahoo.com
MCSD

(in reply to bgeelan)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Return specified portion of string Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts