Sometimes the default filters are not enough. Therfore we write a patch to provide regular expressions in filters with strings.

With 'REGEXP' respectively 'RLIKE' a support for regular expressions in MySQL is possible.

You find a documentation of 'RLIKE' here.

Regards
The Views-Sprint-Team

Comments

Caseledde’s picture

StatusFileSize
new2.41 KB

We checked the MySQL support for the fields decimal, float and integer.

The result is: It works with all of these fields.

Caseledde’s picture

StatusFileSize
new2.21 KB

We noticed that not all databases support regular expressions.

So we restrict this functionality to MySQL.

We proudly present the third patch.

dawehner’s picture

Version: 7.x-3.0-rc3 » 6.x-3.x-dev
Status: Active » Patch (to be ported)

That's really a neat feature! Committed to 7.x-3.x

It would probably make sense to port it to 6.x-3.x

damien tournoud’s picture

if (in_array(db_driver(), array('mysql', 'mysqli'))) {

That's not the proper way of detecting the database type. You want:

DatabaseConnection::getConnection()->databaseType() == 'mysql'

Opening a separate issue.

stborchert’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Patch (to be ported) » Needs review
stborchert’s picture

StatusFileSize
new1.19 KB

Uh, forgot to attach the patch.

dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

Okay, let's port it later

damien tournoud’s picture

Ew. Sorry for the typo in #4.

mustanggb’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (won't fix)