add regexpsCollection and move search logic into it