0

Views comes with a bunch of filters, but seems to be missing "Does not contains any word". I am looking for a way to achieve a similar function with Views but can't find anything relevant. I found some suggestions for this function on Drupal Forums but there never came a solution.

Why I need this? I am looking to display visitor counts in my dashboard by using access logs via the Core Statistics module. There are a lot of crawlers though and I'm filtering their IP addresses out by hand. The problem is I need to add a new filter in Views per IP Address. It would be wishful to add one filter and fill in all IP addresses in one line.

  • 2
    Drupal has the Does not contain & Regular expression filter operators. Does this not do what you're wanting? – Shawn Conn May 21 at 20:43
  • “Does not contain” only uses the complete string of text to filter out e.g “Apple fruit” as filter will not filter out “Apple” or “fruit”. So what I try to achieve is to filter out every word in the string. I’m not familiar with regular expression but after Googling a bit it doesn’t seem the way to go. – Apoc May 22 at 9:59
  • regex (or the inverse, not regex) will let you supply string patterns that you want to see (or not see) in your results. The question isn't specific about the field being filtered or what constitutes a "word" so there might be other constraints that might not make this approach viable. Regardless, learning regexs is a valuable skill and you should time experimenting with those filters. – Shawn Conn May 22 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.