Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 19-06-2009
Member
 
Join Date: Apr 2009
Posts: 97
Vbscript search array

I'm looking for search array in Vbscript. So, can any body tell me that where would i find vbscript search array? Where can i find it in Vbscript? Does any body knows about it?? Kindly provide me the correct solution for the above issue. Would be grateful to you, if any body provide me the correct solution for the above issue.
Reply With Quote
  #2  
Old 19-06-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: Vbscript search array

I'm not sure about the particular code, but may work out for you.

Quote:
Dim sSearchString 'as String
Dim MyArray(3) 'as String
MyArray(1) = "Group1"
MyArray(2) = "Group2"
MyArray(3) = "Group3"
sSearchString = "Group2"

For a = 1 to UBound(MyArray)
If MyArray(a) = sSearchString Then MsgBox MyArray(a)
Next
Reply With Quote
  #3  
Old 19-06-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: Vbscript search array

I think you need to create a zero-based string array by using the Split function. The Join function is used to reassemble the string after applying the Filter function. The Filter function searches the elements of a zero-based array, to match a pattern of one or more characters, and creates a new array, either with or without the elements containing the matched pattern.
Reply With Quote
  #4  
Old 19-06-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: Vbscript search array

For that i think you can use ASP Vbscript Array filter function. As in ASP, vbscript array filter function enables you to search the array items based on the filter criteria. Vbscript filter function returns the vbscript array having matched items containing the specified string pattern. You can control the result output of vbscript filter function whether you want to include the matched items in the output vbscript array or exclude the matched items. Further in ASP Vbscript code you can use the vbscript for loop or for each loop to read the array items at each index.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Vbscript search array"
Thread Thread Starter Forum Replies Last Post
Search results getting redirected and browser performs background search when idle Kusumanjali Technology & Internet 6 08-06-2011 11:36 PM
How can I search for all files in windows vista by a word or phrase in the standard XP search box? Shazid Operating Systems 4 05-04-2011 04:29 AM
Assigning an array to an array MACE Software Development 3 18-11-2009 05:19 PM
Search Companion text search folder doesn't find all files Hrishia Windows XP Support 2 27-11-2008 10:16 PM
Reliance Communications launched Quick Search new search engine on mobile Gauresh India BroadBand 0 07-11-2008 02:15 PM


All times are GMT +5.5. The time now is 07:37 AM.