devi usare la corrispondenza "non cattura" ?:per far fronte ai siti Web non "http://"
come
select
id,
substring(website from '(?:.*://)?(?:www\.)?([^/]*)')
as website_domain
from contacts
http://sqlfiddle.com/#!17/197fb/14
https://www.postgresql.org /docs/9.3/static/functions-matching.html#POSIX-ATOMS-TABLE