RE: Find text in Word - without affecting the Find dialog box



Hello Dave,

For the first question: how to efficiently find a string in Word plain
text, please refer to the String searching algorithms introduced in page:
http://en.wikipedia.org/wiki/String_searching_algorithm. It describes
serveral commonly used algorithms. For this case, I think that the KMP
(Knuth-Morris-Pratt) algorithm will be fine according to its time
complexity: O(m+n), (Let m be the length of the pattern and let n be the
length of the searchable text.) For details about KMP, see:
http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm.

For the second question, Word does not expose any method to detect if a
built-in dialog is opened or not. Therefore, I think we need to use our own
search function for all the cases.

If you have any other concern or need anything else, please feel free to
let me know.

Sincerely,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • Re: Do java support String methods properly ?
    ... String searching algorithms! ... depending on the sizes of the text and the pattern, the size of the alphabet, the distribution of the characters and if you are searching a pattern in different texts (do not forget that you need to generate a ... It has been nearly 10 years since I implemented these algorithms, ...
    (comp.lang.java.programmer)
  • Re: Similarity searching
    ... a factor of N*log, if the arrays are big you won't in general have to compare to the last element so I don't see the factor of L**2, and I don't see where that C**2 factor is coming from at all. ... There are also sorting algorithms which don't compare each item to every other item, yet still generate a sorted result. ... Similarity searching is still an active science, but there are a lot of useful algorithms out there now. ...
    (comp.lang.fortran)
  • Re: I need some guideance regarding parallel processing
    ... searching, range searching, associative searching and all the other ... getting good algorithms before you try to optimize things. ... What standard have you implemented to network machines together? ... What message passing standard do you use? ...
    (comp.lang.fortran)
  • Merging in parallel computation
    ... We are a research group working on classic algorithms on PRAM. ... the dominant papers on merging, sorting and searching in parallel is ... %T Searching, Merging, and Sorting in Parallel Computation ...
    (comp.parallel)

Quantcast