Skip to content

plepe/strsearch2regexp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strsearch2regexp

Converts a search string to a unicode regexp with character variants (e.g. "foo bar" -> "f[oöó][oöó].*b[aäá]r")

This code is far from complete. Pull requests are very welcome!

Installation

npm add --save strsearch2regexp

Usage

const strsearch2regexp = require('strsearch2regexp')

console.log(strsearch2regexp('foo bar'))
// f[oòóôõöø]o.*b[aàáâãäå]r

About

Converts a search string to a unicode regexp with character variants (e.g. "foo bar" -> "f[oöó][oöó].*b[aäá]r")

Resources

License

Stars

Watchers

Forks

Packages

No packages published