473,395 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

String Function(help needde Urgently)

Hi

I needed help urgently.

Suppose I have file name like test12wehow.asp
test11234r5wesow.asp,upppwenow.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.

Thanks
Mar 14 '07 #1
1 1408
jhardman
3,406 Expert 2GB
pathakrajeev,

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 %>
Jared
Mar 14 '07 #2

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

Similar topics

4
by: Chris Kettenbach | last post by:
Is there a string function that returns the number of times string a occurs in string b? Thanks, Chris
5
by: K.S. | last post by:
Have to clean up an old class library and have a string class with slightly different functions. The interface I wrote works quite well except the operator! Actually I only need sdl string operator...
3
by: Dj Frenzy | last post by:
Hi, this should be a pretty easy question for the advanced people on here. Basically , I have two strings: string transDate = "20030901"; string transTime = "1200"; I want to know the best...
10
by: darren | last post by:
hi iam righting aprogram that creates its own desktop shotcut and a want to add a command line switch so i want to have a string like this "C:\Documents and Settings\Darren\My Documents\Visual...
2
by: Aaron | last post by:
I need some help with formatting this string. Input: asfbsdfsd<time>June 12, 2003</time>blah blah I need to filter out everything outside the tags. so the output would be. output:June 12,...
2
by: Edward | last post by:
My function to populate fields on a form from a collection: Private Sub cbfSetUpAddresses(ByVal pcolAddress As Collection) Line 1 Me.txtAddress1.Text = pcolAddress(1).ToString Line 2 ...
16
by: ^MisterJingo^ | last post by:
Hi all, I have a variable called root which contains (E:\Web\Websites\fileBrowse\) and then I have a variable called path which uses root, and adds directories on to it (this is part of a file...
4
by: ali | last post by:
Hi, I'm have a base class with a virual function toString. All the derived classes will have to implement this function. Here's the code I have used: //in base.h virtual string* toString();
8
by: samthemist | last post by:
I'm using this sub, to get the string between two places in a string, for example: $result = GB($string, 'hi', 'there'); sub GB { return $1 if $_ =~ /@_(.*?)@_/; } I have a string, $target -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.