If somebody interested I've got a solution: SELECT count(*) as quan, SUBSTRING(r_js, 1, locate('/', r_js, 8)) as a FROM main where length(r_js) group by a order by quan desc; On 04-Oct-2001 [EMAIL PROTECTED] wrote: > Hi there! > I have a varchar(255) row in a table, that contains some URL f.e. > http://www.somehost.net/eng/headlines/cache/699.htm > I need to cut the first (http://www.somehost.net) part from this URL. > After looking at regexp realization in MySQL I've written > > SELECT r_js REGEXP "^[http://./]" as a FROM main; > > But it returns 0 or 1 > So perhaps somebody knows is there a way to cut a varchar field by regex (or > any other function) in MySQL SQL realization??? -- Ruben Muradyan System Administrator/Security Manager PanARMENIAN Network
+--------------------------------------------------+ |Software is like sex: it's better, when it's free.| +--------------------------------------------------+ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php