original_string: public function filter($pattern)
      {
          return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) {
              return preg_match($pattern, $item->getValue());
          }));
      }
code: public function filter($pattern)
      {
          return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) {
              return preg_match($pattern, $item->getValue());
          }));
      }
code_tokens: public function filter ( $ pattern ) { return new self ( array_filter ( $ this -> items , function ( AcceptHeaderItem $ item ) use ( $ pattern ) { return preg_match ( $ pattern , $ item -> getValue ( ) ) ; } ) ) ; }
docstring: Filters items on their value using given regex.
  
  @param string $pattern
  
  @return self
docstring_tokens: Filters items on their value using given regex .