diff --git a/lib/lucene_to_regex.js b/lib/lucene_to_regex.js index 6cbe2aa..3784248 100644 --- a/lib/lucene_to_regex.js +++ b/lib/lucene_to_regex.js @@ -36,10 +36,11 @@ const buildRegex = (ast, negate) => { module.exports = { parse: lucene.parse, toString: lucene.toString, + buildRegex: buildRegex, toRegex: (query, flag) => { const ast = lucene.parse(query) const regex = `^${buildRegex(ast)}.*$` return new RegExp(regex, flag) } -} \ No newline at end of file +}