Kind of a similar question
I have many text fragments that I use many, many, many times a day. I want to create something that can look up a database / preferably a javascript array full of sentence-length strings, returning the most probable one. Most auto-complete returns the ones you enter in the sequence you enter. I do not remember how I describe.
For example; Let's say I have this element in my array: "yellow banana"
When I search for a banana, it will not show me anything. It only works when I type "yello" ... etc.
Is it also possible to return matches when several words are present in the element name, but in different places?
So, when I type, for example, a " fast dog fox " that returns:
" fast brown fox jumps over a lazy dog "
got an idea and question from actb.js
Thanks for helping me be more lazy
source
share