Re: Good way to do lookups...
- From: "Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Fri, 2 Jun 2006 07:24:40 +0200
Bob,
You say it yourself use the string.split to create arrays of words.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemstringclasssplittopic.asp
Know that there are more split methods and as well much overloaded methods.
The opposite from the split is the join
http://msdn2.microsoft.com/en-us/library/57a79xd0.aspx
I hope this helps,
Cor
"BobRoyAce" <broy@xxxxxxxxxxxxxxxxxxxx> schreef in bericht
news:1149221336.394612.306470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Let's say that I have a table with like 525 records where each record
contains a string to look for and a string to replace with (e.g.
AVENUE, AVE). What I need to do is parse through a string (a street
address) and then for each "word/token" found, I want to look it up and
replace it if I find it in one of the 525 records. I have two
questions...
1) Is there an easy way to tokenize a string (i.e. split it out into
its separte words, where words are separated by a space)? For example,
tokenizing "Eden Hill Str" would result in three "words": "Eden",
"Hill", and "Str".
2) What would be the best way to facilitate searching for each token?
One way to do it would be to use a dataset and then there's probably
some kind of lookup function I could use (which would take advantage of
primary key field which we are actually looking up). Is that the best
way or is there a better one?
.
- Follow-Ups:
- Re: Good way to do lookups...
- From: BobRoyAce
- Re: Good way to do lookups...
- References:
- Good way to do lookups...
- From: BobRoyAce
- Good way to do lookups...
- Prev by Date: Re: Synchronize VS2005 Projects directory?
- Next by Date: Re: Need to get file Version
- Previous by thread: Good way to do lookups...
- Next by thread: Re: Good way to do lookups...
- Index(es):
Relevant Pages
|