B
BobRoyAce
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?
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?