MySQL Regex or Split

Steve Jibson steve at jibson.com
Wed Apr 27 12:17:15 MDT 2005


You can do regular expression matching in a SELECT with MySQL.  (see 
http://dev.mysql.com/doc/mysql/en/regexp.html).  I think that should 
give you the ability to do what you want to do.

As far as the exact expression you want... well, rather than show off my 
ignorance, I'll just sit here silently and let you think that I'm 
smarter than I really am.



Eric Jensen wrote:
> Trying to make some queries a little more efficient.  I want to group
> HTTP referers together but not with the full URL.  For example, just
> "www.google.com" instead of the full search string.  I can't find a way
> to do this in MySQL.  Is there a way to turn
> "http://search.msn.com/results.aspx?q=things+stuff&FORM=SSRE" into
> "search.msn.com" in a SELECT statement?  Otherwise I have to loop
> through them all and parse them myself and run more queries then necessary.
> 
> Eric Jensen
> .===================================.
> | This has been a P.L.U.G. mailing. |
> |      Don't Fear the Penguin.      |
> |  IRC: #utah at irc.freenode.net   |
> `==================================='




More information about the PLUG mailing list