Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 12th, 2003, 05:32 PM
Authorized User
 
Join Date: Nov 2003
Location: Stockholm, , Sweden.
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
Reply With Quote
  #2 (permalink)  
Old November 12th, 2003, 07:07 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Try InStrRev()

Peter
------------------------------------------------------
Work smarter, not harder.
Reply With Quote
  #3 (permalink)  
Old November 13th, 2003, 07:20 PM
Authorized User
 
Join Date: Nov 2003
Location: Stockholm, , Sweden.
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

Reply With Quote
  #4 (permalink)  
Old November 14th, 2003, 10:58 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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?"

;)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:58 PM.


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