function Combine::opRegex

Filters by a regular expression.

Parameters

string $field: The expression pointing to the queries field, for example "foo.bar".

Overrides StringFilter::opRegex

File

core/modules/views/src/Plugin/views/filter/Combine.php, line 211

Class

Combine
Filter handler which allows to search on multiple fields.

Namespace

Drupal\views\Plugin\views\filter

Code

protected function opRegex($expression) {
  $placeholder = $this->placeholder();
  $this->query
    ->addWhereExpression($this->options['group'], "{$expression} REGEXP {$placeholder}", [
    $placeholder => $this->value,
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.