diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
index 4fd7d0d..35fe96d 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
@@ -216,6 +216,7 @@ public function mapConditionOperator($operator) {
       // statements, we need to use ILIKE instead.
       'LIKE' => array('operator' => 'ILIKE'),
       'NOT LIKE' => array('operator' => 'NOT ILIKE'),
+      'RLIKE' => array('operator' => '~*'),
     );
     return isset($specials[$operator]) ? $specials[$operator] : NULL;
   }
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
index abda556..5dd90b7 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
@@ -295,6 +295,7 @@ public function mapConditionOperator($operator) {
     static $specials = array(
       'LIKE' => array('postfix' => " ESCAPE '\\'"),
       'NOT LIKE' => array('postfix' => " ESCAPE '\\'"),
+      'RLIKE' => array('operator' => 'REGEXP'),
     );
     return isset($specials[$operator]) ? $specials[$operator] : NULL;
   }
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
index 5403611..9dda133 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
@@ -14,4 +14,5 @@ public function forUpdate($set = TRUE) {
     // SQLite does not support FOR UPDATE so nothing to do.
     return $this;
   }
-}
\ No newline at end of file
+
+}
diff --git a/core/lib/Drupal/Core/Database/Query/Condition.php b/core/lib/Drupal/Core/Database/Query/Condition.php
index c23ad76..5a0f172 100644
--- a/core/lib/Drupal/Core/Database/Query/Condition.php
+++ b/core/lib/Drupal/Core/Database/Query/Condition.php
@@ -293,6 +293,7 @@ protected function mapConditionOperator($operator) {
       'NOT EXISTS' => array('prefix' => ' (', 'postfix' => ')'),
       'IS NULL' => array('use_value' => FALSE),
       'IS NOT NULL' => array('use_value' => FALSE),
+      'RLIKE' => array('operator' => 'RLIKE'),
       // Use backslash for escaping wildcard characters.
       'LIKE' => array('postfix' => " ESCAPE '\\\\'"),
       'NOT LIKE' => array('postfix' => " ESCAPE '\\\\'"),
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php
index 85787b8..dc880b3 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php
@@ -368,6 +368,39 @@ function testRandomOrder() {
   }
 
   /**
+   * Tests that filter by a regular expression works as expected.
+   */
+  public function testRegexCondition() {
+    $test_groups[] = array(
+      'regex' => 'hn$',
+      'expected' => array(
+        'John',
+      ),
+    );
+    $test_groups[] = array(
+      'regex' => '^Pau',
+      'expected' => array(
+        'Paul',
+      ),
+    );
+    $test_groups[] = array(
+      'regex' => 'Ringo|George',
+      'expected' => array(
+        'Ringo', 'George',
+      ),
+    );
+    foreach ($test_groups as $test_group) {
+      $query = db_select('test', 't');
+      $query->addField('t', 'name');
+      $query->condition('t.name', $test_group['regex'], 'RLIKE');
+      $result = $query->execute()->fetchCol();
+
+      $this->assertEqual(count($result), count($test_group['expected']), 'returns the expected number of rows.');
+      $this->assertEqual(sort($result), sort($test_group['expected']), 'Returns the expected rows.');
+    }
+  }
+
+  /**
    * Tests that aliases are renamed when they are duplicates.
    */
   function testSelectDuplicateAlias() {
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 be3e132..0fdfe74 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
@@ -112,6 +112,12 @@ function operators() {
         'method' => 'op_longer',
         'values' => 1,
       ),
+      'regular_expression' => array(
+        'title' => t('Regular expression'),
+        'short' => t('regex'),
+        'method' => 'op_regex',
+        'values' => 1,
+      ),
     );
     // if the definition allows for the empty operator, add it.
     if (!empty($this->definition['allow empty'])) {
@@ -130,17 +136,6 @@ function operators() {
         ),
       );
     }
-    // Add regexp support for MySQL.
-    if (Database::getConnection()->databaseType() == 'mysql') {
-      $operators += array(
-        'regular_expression' => array(
-          'title' => t('Regular expression'),
-          'short' => t('regex'),
-          'method' => 'op_regex',
-          'values' => 1,
-        ),
-      );
-    }
 
     return $operators;
   }
@@ -333,7 +328,13 @@ function op_longer($field) {
     $this->query->add_where_expression($this->options['group'], "LENGTH($field) > $placeholder", array($placeholder => $this->value));
   }
 
-  function op_regex($field) {
+  /**
+   * Filters by a regular expression.
+   *
+   * @param string $field
+   *   The expression pointing to the queries field, for example "foo.bar".
+   */
+  public function op_regex($field) {
     $this->query->add_where($this->options['group'], $field, $this->value, 'RLIKE');
   }
 
