Lucene to Regex for Javascript
This tiny project provides ability to convert a boolean query string to regular expressions.
Installation
npm install --save lucene-to-regex
Usage
const ltr = const regex = ltr// regex: /^(?=.*?\bLucene\b)(?=.*?\bRegex\b)(?=.*?(?=.*?\beasy\b)(?!.*?\bdifficult\b)).*$/i regex// result: true regex// result: false
You can set flag by passing an additional parameter to the method.
Check out bripkens/lucene for lucene