Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2003, 05:32 PM
Authorized User
 
Join Date: Nov 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Find a Particular Word

hi all!

I'm just about doing a "Try it out" in Beg ASP 3.0 - Chapter 10 - about displaying a Directory. Of course I want to spice it up a bit with some adds of my own.. :)

Everything's just working fine till I got myself this hard nut to crack..

You see, I want to display the Server Path as you can obtain with
Request.ServerVariables("PATH_INFO")

but then I only want to display the ONE Parent folder of the .asp file I'm browsing

So I figured, Using the "Finding a Particular Word" - string manipulator - Instr(string, "/") - would be a nice aid for the task.

Only that, the Instr() returns the value of the first occurrence of the "/" starting from the left


Now, Is there a way to make a Instr() search starting from the right?
That I think would just do it! :D

/ Paw
 
Old November 12th, 2003, 07:07 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Try InStrRev()

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old November 13th, 2003, 07:20 PM
Authorized User
 
Join Date: Nov 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks mate!

Of course, now when I knew what to search for, I easily found a reference to the InStrRev() in Appendix D, page 968 (Beginning ASP 3.0).

Experience is the key I guess ..

/ Paw

 
Old November 14th, 2003, 10:58 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

After ten minutes of troubleshooting, the consultant pressed one button on the side of a machine and the whole plant started back up. He turned to the plant manager and said, "Ok, all fixed, that'll be $10,000."

The plant manager was shocked, "You're CRAZY! A monkey could have pressed that one button."

The consultant thoughtfully replied, "But would the monkey have known WHICH button to press?"

;)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating word doc - word behaviour mat41 Classic ASP Professional 2 April 29th, 2007 06:46 PM
Function to find if a letter is in a word jfrizelle Access VBA 2 January 29th, 2007 05:44 PM
Open Word Doc from Access - find, find next save donaldmaloney Access VBA 1 May 25th, 2005 11:09 AM
Create a find and a find and replace in VB.NET snowy0 VB How-To 0 January 26th, 2004 07:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.