function createMultiwordSearchRegex(input) {
  if (input) {
    return new RegExp(_.map(input.split(/\s+/), regexpEscape).join(".*"), "i");
  }
}
// Creates a regex that will find an order dependent, case insensitive substring. All whitespace will be rendered as ".*" in the regex, to create a fuzzy search.
Creates a regex that will find an order dependent, case insensitive substring. All whitespace will be rendered as ".*" in the regex, to create a fuzzy search.
Creates a regex that will find an order dependent case insensitive substring . All whitespace will be rendered as " . * " in the regex to create a fuzzy search .
function createMultiwordSearchRegex(input) {
  if (input) {
    return new RegExp(_.map(input.split(/\s+/), regexpEscape).join(".*"), "i");
  }
}
function createMultiwordSearchRegex ( input ) { if ( input ) { return new RegExp ( _ . map ( input . split ( / \s+ / ) , regexpEscape ) . join ( ".*" ) , "i" ) ; } }
Creates a regex that will find an order dependent, case insensitive substring.
Creates a regex that will find an order dependent case insensitive substring .