Case insensitive regular expression filter in MariaDB

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Case insensitive regular expression filter in MariaDB

Afshin Mehrabani
Hello,

I have noticed an issue in my local machine and wanted to open a PR but I thought it's better to confirm this with you guys first.

I'm using MariaDB and tried to use iregex but noticed that it doesn't work at all. After adding `(?i)` to the beginning of the regex, I managed to filter the results in a case-insensitive way.

See https://mariadb.com/kb/en/library/pcre/ for more Regex options.

I'm using:

mysql  Ver 15.1 Distrib 10.2.10-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Let me know what you think. I can open a PR.

Thanks

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/10348a66-6427-4dbd-b1c6-fb882dc88241%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Case insensitive regular expression filter in MariaDB

Tim Graham-2
Django doesn't have official support or testing with MariaDB. It's proposed at https://groups.google.com/d/topic/django-developers/31j1dNOZ7zc/discussion.

On Tuesday, November 14, 2017 at 10:17:54 AM UTC-5, Afshin Mehrabani wrote:
Hello,

I have noticed an issue in my local machine and wanted to open a PR but I thought it's better to confirm this with you guys first.

I'm using MariaDB and tried to use iregex but noticed that it doesn't work at all. After adding `(?i)` to the beginning of the regex, I managed to filter the results in a case-insensitive way.

See <a href="https://mariadb.com/kb/en/library/pcre/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmariadb.com%2Fkb%2Fen%2Flibrary%2Fpcre%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_4DBSYF3ecEpWrCCVtv2q2oM_jQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmariadb.com%2Fkb%2Fen%2Flibrary%2Fpcre%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_4DBSYF3ecEpWrCCVtv2q2oM_jQ&#39;;return true;">https://mariadb.com/kb/en/library/pcre/ for more Regex options.

I'm using:

mysql  Ver 15.1 Distrib 10.2.10-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Let me know what you think. I can open a PR.

Thanks


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4e958ac6-5813-4a74-923c-223cad2f1df7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.