filter.rb: support for approximate matches