Searching list of words not working on pdf viewer

Hey there!

Sorry, I should have been a bit more specific in my last comment.

You’ll probably want to do something like this:

let arr = [‘RAS’, ‘Cable’, ‘92780’]
var regexFromMyArray = arr.join("|");

instance.docViewer.setSearchHighlightColors({
   searchResult: ‘rgba(0, 255, 0, 0.5)’,
   activeSearchResult: ‘rgba(0, 255, 0, 0.5)’
});
instance.searchTextFull(regexFromMyArray, { regex: true })

The things I changed here was using searchTextFull instead of just searchText, and using a string representation of the regex rather than an actual regex.

I hope this helps!

Thanks,
Logan