472,093 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,093 software developers and data experts.

String Function(help needde Urgently)


I needed help urgently.

Suppose I have file name like test12wehow.asp

one thing is common in all the files are "we".
I want to read the file as how.asp,sow.asp,now.asp.(After the word "we" that will be the file name.)

How to use the string function?please provide me the detailed solution.

Mar 14 '07 #1
1 1350
3,406 Expert 2GB

w3schools is a good resource. Please check out the following: http://www.w3schools.com/vbscript/func_instr.asp

Expand|Select|Wrap|Line Numbers
  1. <%
  2. dim str1, str2, shortenedString
  3. str1 = "upppwehow.asp"
  4. str2 = "we"
  5. shortenedString = right(str1, (len(str1)-instr(str1, str2)-1))
  6. response.write shortenedString %>
Mar 14 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Chris Kettenbach | last post: by
3 posts views Thread by Dj Frenzy | last post: by
10 posts views Thread by darren | last post: by
2 posts views Thread by Aaron | last post: by
16 posts views Thread by ^MisterJingo^ | last post: by
4 posts views Thread by ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.