Theia installation has been updated - September 10, 2011
« May 2012
S M T W T F S
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Theia
Using regular expressions in mySQL queries « home
icon
posted on 12:43 - 05 August 2009 | posted by Lev
last modified on 17:53 - 28 August 2009 | last modified by Lev

I just thought I'd mention this since until about a month ago, I had no idea about it myself! It is possible to perform regular expression matches directly in your mySQL query.

This is great news for me since there have been many times I've wanted to do just that. Today I finally found my first use for it: searching for items (matching a tag). Here's how this query looks, and how you can apply regular expressions to mySQL queries to.

MYSQL CODE
SELECT * FROM `theia_content` WHERE `tags` REGEXP ',? ?theia ?,?'

Since I consider myself pretty knowledgeable with using regular expressions, this is going to make things a lot easier in the future for me. :)

Kudos to xandro for the info!

post reply
Bookmark item @
bookmarkbookmarkbookmarkbookmarkbookmark