Solved

asp array  - replace string in array

Posted on 2007-11-29
3
2,400 Views
Last Modified: 2008-06-04
I have an array in asp

can someone help me to search for a string in the array that is an exact match (meaning if i search cat it will return cat but not categories) and replace it with another string i specify.
0
Comment
Question by:bottomlinemg
3 Comments
 
LVL 25

Expert Comment

by:kevp75
ID: 20373550
you should be able to get away with using the instr function.  I would do a binary compare though instead of a textual compare...

http://www.w3schools.com/vbscript/func_instr.asp
0
 
LVL 1

Expert Comment

by:esthera
ID: 20373793
can someone help me write a function to do this?
0
 
LVL 28

Accepted Solution

by:
sybe earned 250 total points
ID: 20373795

   
For i = 0 To Ubound(MyArray)
   If MyArray(i) = "cat" Then MyArray(i) = "another string"
Next 

Open in new window

0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
UTC (timezone) without using an API 16 46
Live mode in DW, need to creae Session 4 96
Call a function within the ASP code 4 12
html Uncheck Checkbox 2 13
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question