Skip to content

unamatasanatarai/FuzzyMatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

FuzzyMatch

JavaScript proof-of-concept fuzzy match working with RegEx.

##Demo Here is a simple implementation

Usage

Checking if match is found

fuzzyMatch.prep('Searching');
console.log(fuzzyMatch.match('I was searching for this'));
console.log(fuzzyMatch.match('I failed to find anything ;('));

Highlighting entire blocks

fuzzyMatch.prep('Searching');
console.log(fuzzyMatch.hiblock('I was searching for this'));
console.log(fuzzyMatch.hiblock('I failed to find anything ;('));

Highlighting individual letters

fuzzyMatch.prep('Searching');
console.log(fuzzyMatch.hi('I was searching for this'));
console.log(fuzzyMatch.hi('I failed to find anything ;('));

FAQ

  1. Why prep?

    That's because you are searching for one string over hundreads of lines of text. prep pre-caches the search query to make the script run faster.

  2. Why 'regex'?

    Because I can :)

About

RegEx JS Fuzzy Match | Fuzzy Search

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published