Hi
I am trying to extract the actual number of host names in the database from the Url field.
So I want to do something like:
select distinct sandr('>>http://=!/+/=.*=>>=','',Url) from html;
If I remove the last part (=.*=>>=), the above line will give me the domain name, but with the trailing pathname as well. Eg:
http://www.thelancet.com/era
becomes www.thelancet.comera
when all I want is
www.thelancet.com
Is there an easy way to do this?
Thanks,
P.
I am trying to extract the actual number of host names in the database from the Url field.
So I want to do something like:
select distinct sandr('>>http://=!/+/=.*=>>=','',Url) from html;
If I remove the last part (=.*=>>=), the above line will give me the domain name, but with the trailing pathname as well. Eg:
http://www.thelancet.com/era
becomes www.thelancet.comera
when all I want is
www.thelancet.com
Is there an easy way to do this?
Thanks,
P.