fuzzy_needle: Turn a list of words into a fuzzy regex

Description Usage Arguments Value Examples

View source: R/internal_functions.R

Description

A fuzzy regex is one that will match search terms in any order by using PERL lookaround. This is very slow, but often worth the cost to get more complete results.

Usage

1

Arguments

vec

(Character) A string containing space-separated keywords to search for.

Value

A string where each word has been wrapped as a lookaround term.

Examples

1
2
3
4
5
## Not run: 
fuzzy_needle("network centrality")
#> [1] "(?=.*network)(?=.*centrality)"

## End(Not run)

librarian documentation built on July 12, 2021, 5:07 p.m.