Skip to content

Playground ​

Type a query and pick a function and its options. The cards sum up what the function returns, and the haystack below highlights the matches. Click Edit text to search your own haystack.

typos is a maximum: a term gets at most one typo per 4 letters, so mllr (4 letters) gets 1 even with typos at 2, and does not find Müller, which is 2 typos away.

With search, Did you mean shows the suggestion from suggest for each missing term: try quikc forrest to get quick and forest.

Matches
20
Found
the ×15, dog ×3, fox ×2
Missing
lodz, cafe
Did you mean
lodz → Łódź, cafe → café
Show the result as JSON
{"start":31,"end":34,"text":"the","term":"the"}
{"start":40,"end":43,"text":"dog","term":"dog"}
{"start":53,"end":56,"text":"the","term":"the"}
{"start":80,"end":83,"text":"the","term":"the"}
{"start":93,"end":96,"text":"The","term":"the"}
{"start":106,"end":109,"text":"the","term":"the"}
{"start":152,"end":155,"text":"the","term":"the"}
{"start":165,"end":168,"text":"the","term":"the"}
{"start":183,"end":186,"text":"the","term":"the"}
{"start":252,"end":255,"text":"the","term":"the"}
{"start":256,"end":259,"text":"fox","term":"fox"}
{"start":271,"end":274,"text":"the","term":"the"}
{"start":283,"end":286,"text":"the","term":"the"}
{"start":287,"end":290,"text":"dog","term":"dog"}
{"start":306,"end":309,"text":"the","term":"the"}
{"start":351,"end":354,"text":"the","term":"the"}
{"start":370,"end":373,"text":"the","term":"the"}
{"start":386,"end":389,"text":"fox","term":"fox"}
{"start":398,"end":401,"text":"the","term":"the"}
{"start":402,"end":405,"text":"dog","term":"dog"}
Haystack
Thé quick brown føx jumps over the låzy dog in Łódź, then naps beside a café on the Straße. The élève at the next table orders a crème brûlée and asks the señor at the counter about the façade, which a naïve tourist mistakes for a museum. By evening the fox is back in the forest, the dog is asleep, and the café in Łódź closes its doors. Nobody in the city remembers the quick brown fox, except the dog.

Search a list ​

A search box over 10,000 made-up companies. Every company's name and URL go through findRanges, and score ranks the results, with a match in the name counting five times as much as one in the URL. The top ten are shown, highlighted with toSegments. With typos at 1, mulelr still finds Müller; set it to 0 for exact matches only.

Released under the BSD-3-Clause License.