vb6 - Arabic word search tool -


i want make search tool find specific word in arabic language can find word example:

ذهب الولد إلى المدرسة من البيت و منهم الى البيت

if try find word "من", code not finds word "من", finds part of word " منهم". don't want program that. want find word " من" , every word , make whole case word.

to make things more clear (using english example), if search word 'to' in following sentence, want whole words found, , not words contain word 'to' such 'toward' become part of result.

sentence: want go towards bus.

searches can frustrating. add space @ front of search string , @ end , search searchstring.

so... "i want go towards bus." becomes " want go towards bus. ". search " ". problem method punctuation can cause problem. example, if wanted search "bus", use:

" want go towards bus. " , search " bus ". not found because there punctuation after word bus.

i encourage use regular expressions functionality. vb6 not have regular expressions built in, can use microsoft vbscript regular expressions functionality accomplish this. please take @ page started: http://support.microsoft.com/kb/818802

edit based on comment

you have line of code:

pos = instr(start_at, txtbody.text, target) 

try changing line this:

pos = instr(start_at, " " & txtbody.text & " ", " " & target & " ", vbbinarycompare) 

by adding spaces in code, checking (space)target(space). don't miss potential matches @ beginning or end of txtbody.text, spaces added there (for comparison purposes only). adding vbbinarycompare, instr perform case sensitive search.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -