Re: FN-FORUM: Array search
date posted 17th January 2006 21:05
The Filter function you're using will match partial patterns, so "10"
will match "103", "1000000", "894309810" etc.
Have a look at
http://www.devguru.com/Technologies/vbscript/quickref/filter.html
for more details.
Adam
>
>>
>> Hi
>>
>> I am searching an array, after googling furiously, and have got it
>> working
>> lovely, apart from one thing. The array has numbers like 1, 2, 3
>> and 102,
>> 103, and 104. the problem is the search decides that 10 is in
>> there too.
>>
>> Any ideas, nothing on Google and I cannot find a vb function that
>> ensures
> it
>> only gets the complete number.
>>
>> Code doing the search is;
>>
>> SearchArray = UBound(Filter(arrArray, strValuetoSearch, True, 0))
>> > -1
>>
>> VbScript
>>
>> The result is showing true, which in one sense it is, but still
>> not right.
>>
>> Any ideas?
>>
>> David J MacKillican
>> http://www.djmwebservices.com your business open 24 hours
>>
>> Telephone: 01249 701194
>> Mobile: 07973194834
>> Facsimile: 01249 713501
>>
>> The information contained in or attached to this email is intended
>> only
> for
>> the use of the individual or entity to which it is addressed. If
>> you are
> not
>> the intended recipient, or a person responsible for delivering it
>> to the
>> intended recipient, you are not authorised to and must not
>> disclose, copy,
>> distribute, or retain this message or any part of it. It may contain
>> information which is confidential and/or covered by legal
>> professional or
>> other privilege (or other rules or laws with similar effect in
> jurisdictions
>> outside England and Wales).
>>
>>
>>
>> --
>> Freelancers, contractors earn more with Prosperity4
>> Call 0870 870 4414 or visit www.prosperity4.com
>> and benefit from Inland Revenue approved expenses today.
>>
>> To advertise here: http://www.freelancers.net/advertising.html
>>
>>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
>