Posted by Anze on 09/29/05 00:41
Hi all!
I have a MySQL database that contains URLs and would like to fetch different
domain names from the field. Is there some sort of regular expression match
function? I need something like:
SELECT REGEXP('^(http://)?([^/])+/.*$', t.url, '$1') FROM my_table t;
That is, I need some sort of string function that would return a part of the
string based on a regular expression match.
Am I missing something? I looked around but couldn't find it. It looks very
basic stuff to me, there must be something like that out there?
Any advice would be welcome.
Kind regards,
Anze
[Back to original message]
|