When using matchWildcards search in Word, the search API results and search box results appear differently #4992
Labels
Area: Word
Issue related to Word add-ins
Status: in backlog
Issue is being tracked in the backlog but timeline for resolution is unknown
Provide required information needed to triage your issue
When using matchWildcards search in Word, the search API results and search box results differently
Your Environment
Expected behavior
the text is four _ , i want to serach middle tow __ 's range
set the document text is '____' , now i search '__', the word app(windows/mac) normal search is two results([1,2], [3,4]), when i use advance search, it's tree results([1,2]|[2,3]|[3,4]). and when i search by api like
context.document.body.search("__", { matchWildcards: true })
, it's two results([1,2][3,4]). i expect it's three results like word app advance search, because i want to find the range concat by second and three _Current behavior
word search api return two results
Steps to reproduce
Word.run(async (context) => { // Construct a wildcard expression and set matchWildcards to true in order to use wildcards. const results: Word.RangeCollection = context.document.body.search("__", { matchWildcards: true }); results.load("length"); await context.sync(); console.log('results', results.items) await context.sync(); })
The text was updated successfully, but these errors were encountered: