|
-
Apr 1st, 2004, 06:49 AM
#1
Thread Starter
Fanatic Member
(fairly) advanced string handling loop
I need to create a loop in VBscript for an ASP app that will take a user input and loop through takeing each word and acting on it.
BUT when the two words are joined by SQL logic words like AND, OR NOT etc in capitial take the word before it and the word after it and act on it.
ALSO if the user types quotes then these must be the content of these must be taken as one "word" and acted on.
Given the power of the server and the number of users I need to be as quick as possible so the code must also be efficient while still being easily read.
My problem is I suck at string manipulation in a large way.
Your help will be greatly apriciated.
-
Apr 10th, 2004, 08:42 AM
#2
Thread Starter
Fanatic Member
Am I barking up the wrong tree here?
-
Apr 10th, 2004, 12:51 PM
#3
Originally posted by Matt_T_hat
Am I barking up the wrong tree here?
For efficient string manupulation look into the RegEx(Regular Expression).
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Apr 11th, 2004, 04:23 AM
#4
Frenzied Member
You need to write a funtion that checks for every word you want to act on, using the logic that you stated, then loop through the text calling the function for every word in a string.
-
Apr 12th, 2004, 02:27 PM
#5
New Member
well.... I always like to use the SPLIT and JOIN functions... basically you would start at the top level of your logic (like SQL statements) and start chopping. Then you could process each word through loops. The problem will be to note all keywords and then lay out a logic of what gets treated when...
I see it as quite possible, just with some planning.
-
May 20th, 2004, 05:41 AM
#6
Thread Starter
Fanatic Member
Ok thankyou.
I will take some time (stop being ill) and get back to you after I have properly considered what has been said. At least I know it can be done.
Now to start with the how... hmmmmmm....
-
May 20th, 2004, 10:18 AM
#7
Re: (fairly) advanced string handling loop
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|