diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Select.php b/core/lib/Drupal/Core/Database/Driver/mysql/Select.php
index aecae55..68a6b96 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Select.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Select.php
@@ -9,4 +9,13 @@
 
 use Drupal\Core\Database\Query\Select as QuerySelect;
 
-class Select extends QuerySelect { }
+class Select extends QuerySelect {
+
+  /**
+   * Implements \Drupal\Core\Database\Query\SelectInterface::getRegexOperator().
+   */
+  public static function getRegexOperator() {
+    return "RLIKE";
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php
index c2a5a05..a8028ea 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php
@@ -104,6 +104,14 @@ public function orderBy($field, $direction = 'ASC') {
     $this->addField(NULL, $field);
     return $return;
   }
+
+  /**
+   * Implements \Drupal\Core\Database\Query\SelectInterface::getRegexOperator().
+   */
+  public static function getRegexOperator() {
+    return "~*";
+  }
+
 }
 
 /**
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
index 5403611..f4ac53c 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
@@ -14,4 +14,12 @@ public function forUpdate($set = TRUE) {
     // SQLite does not support FOR UPDATE so nothing to do.
     return $this;
   }
-}
\ No newline at end of file
+
+  /**
+   * Implements \Drupal\Core\Database\Query\SelectInterface::getRegexOperator().
+   */
+  public static function getRegexOperator() {
+    return "REGEXP";
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Database/Query/SelectExtender.php b/core/lib/Drupal/Core/Database/Query/SelectExtender.php
index 2f27d1b..b258bdc 100644
--- a/core/lib/Drupal/Core/Database/Query/SelectExtender.php
+++ b/core/lib/Drupal/Core/Database/Query/SelectExtender.php
@@ -327,4 +327,12 @@ public function __call($method, $args) {
       return $return;
     }
   }
+
+  /**
+   * Implements \Drupal\Core\Database\Query\SelectInterface::getRegexOperator().
+   */
+  public static function getRegexOperator() {
+    // @todo Figure out how to implement that as not-static version.
+  }
+
 }
diff --git a/core/lib/Drupal/Core/Database/Query/SelectInterface.php b/core/lib/Drupal/Core/Database/Query/SelectInterface.php
index 779e69d..3cf8114 100644
--- a/core/lib/Drupal/Core/Database/Query/SelectInterface.php
+++ b/core/lib/Drupal/Core/Database/Query/SelectInterface.php
@@ -380,6 +380,14 @@ public function orderBy($field, $direction = 'ASC');
   public function orderRandom();
 
   /**
+   * Get query operator for regular expressions.
+   *
+   * @return string
+   *   The operator used by a specific database implementation.
+   */
+  public static function getRegexOperator();
+
+  /**
    * Restricts a query to a given range in the result set.
    *
    * If this method is called with no parameters, will remove any range
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php
index ed59742..48eb562 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php
@@ -130,8 +130,9 @@ function operators() {
         ),
       );
     }
-    // Add regexp support for MySQL.
-    if (Database::getConnection()->databaseType() == 'mysql') {
+    // Add regexp support depending whether it's supported by the database.
+    $select_class = Database::getConnection()->getDriverClass('Select');
+    if ($select_class::getRegexOperator()) {
       $operators += array(
         'regular_expression' => array(
           'title' => t('Regular expression'),
@@ -334,7 +335,10 @@ function op_longer($field) {
   }
 
   function op_regex($field) {
-    $this->query->add_where($this->options['group'], $field, $this->value, 'RLIKE');
+    $select_class = Database::getConnection()->getDriverClass('Select');
+    if ($operator = $select_class::getRegexOperator()) {
+      $this->query->add_where($this->options['group'], $field, $this->value, $operator);
+    }
   }
 
   function op_empty($field) {
