How do I create a multiple keywords search engine?
3 次查看(过去 30 天)
显示 更早的评论
I am trying to create a multiple keyword search that will allow user to input upto 5 keywords on a display panel and use this data to search for the cell in excel that certisfy this. N/B Only cells with all the keywords certisfy. I would also like the final answer be an new excel file with only the data (raws) that certisfied user input. The user input should not be case sensitive(ignore case). Please help.
0 个评论
回答(1 个)
Walter Roberson
2022-8-12
You can get the keywords from the user using any of inputdlg(), uitable(), uicontrol('style', 'edit') or uieditfield()
Once you have the list of keywords you can check cells using contains() or regexp. If you use contains you might want to use the new pattern() facility to "and" together several patterns.
Question: if the user asks for "cat" and the cell contains "scatter" should it match? What if it contains "cats"? If they ask for mouse and the cell contains "mice"? "ever" and the cell contains "when-ever"?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!