Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help stripping string

Status
Not open for further replies.

kloner

Programmer
May 15, 2000
79
AU
Hi all,

was wondering if someone could help me strip this string :

Dim strURL
strURL = /products.asp?L1=3&L2=0&PARENT_PAGEID=0&TBL_PAGEID=4&offset=50


If the string contains "&offset=" then i would like the string stripped so that it looks like :

strURL = /products.asp?L1=3&L2=0&PARENT_PAGEID=0&TBL_PAGEID=4


Any idea how u do this?

Thanks

kloner
 
strURL = "/products.asp?L1=3&L2=0&PARENT_PAGEID=0&TBL_PAGEID=4&offset=50"

offSetVal = inStr (strURL, "&offset")

If offSetVal > 0 THEN
strURL = LEFT(strURL,offSetVal-1)
END IF
Get the Best Answers! faq333-2924
"A witty saying proves nothing." - Voltaire
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top