function StringFilter::opRegex
Same name in other branches
- 9 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::opRegex()
- 10 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::opRegex()
- 11.x core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::opRegex()
Filters by a regular expression.
Parameters
string $field: The expression pointing to the queries field, for example "foo.bar".
1 method overrides StringFilter::opRegex()
- Combine::opRegex in core/
modules/ views/ src/ Plugin/ views/ filter/ Combine.php - Filters by a regular expression.
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ StringFilter.php, line 404
Class
- StringFilter
- Basic textfield filter to handle string filtering commands including equality, like, not like, etc.
Namespace
Drupal\views\Plugin\views\filterCode
protected function opRegex($field) {
$this->query
->addWhere($this->options['group'], $field, $this->value, 'REGEXP');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.