Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular Expression Filter #1

Open
ekorn opened this issue Sep 2, 2011 · 0 comments
Open

Regular Expression Filter #1

ekorn opened this issue Sep 2, 2011 · 0 comments

Comments

@ekorn
Copy link

ekorn commented Sep 2, 2011

Hi Heather,
it would be nice if glossary could not just filter with a blacklist, but also/additional with a list of regular expressions. At the moment I sent the keyword output in this function to achieve this:

function regExFilter(terms, reExs){
return _.reject(terms, function(term){
return _.any(reExs, function(regEx){
return term.match(regEx);
});
});
}

UPDATE:
In the fork is a updated version

Cheers Nico

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant