|
-
Jan 19th, 2005, 08:45 PM
#1
Thread Starter
Hyperactive Member
query from textbox
I'm wondering if it's possible to search words from a huge text instead of one or two words. Example:
If the actual text says:
I'm walking the dog tonight. The dog is hungry.
Is it possible to search "walking" and "hungry" from one textbox or textarea?
-
Jan 20th, 2005, 04:16 AM
#2
Addicted Member
Re: query from textbox
Yes you can get the required words from the string.
For Eg.
var="I'm walking the dog tonight. The dog is hungry."
varno = InStr(1,var,"walking",0)
If varno is 0 then word found......
You can refer to
http://www.w3schools.com/vbscript/vb...ons.asp#string
and use string functions.
hope this helps!!
prem.
-
Jan 20th, 2005, 09:37 AM
#3
Re: query from textbox
You can also look into RegEx. RegEx is more efficient for complex pattern matching in strings.
If you are simply searching one or two documents then Instr method should suffice.
[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 : 
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
|