stringlist-regexp

v1.0.2
creates a single regexp from a list of strings to search for
regexp search

###stringlist-regexp### converts a list of strings to a nested regexp.

function( strings, [ matchStart: true , matchEnd: true ])

example: `stringListRegExp(['foo','bar','baz']); //yields (^foo$|b(ar$|az$)) stringListRegExp(['foo','foobar','bar','baz'], true, false); //yields (^(foo(bar)?|b(ar|az)))

Build Status

npm i stringlist-regexp

Metadata

  • ISC
  • Whatever
  • Ivo de Kler
  • released 11/11/2015

Downloads

Maintainers