On 10 July 2011 13:25, Mykyta Yevstifeyev wrote: >> !^ftp://(([^@]*)@)?([^:/?#]*).*$!\\3!i Yes, that's something where I can ignore greedy or not greedy. And it will be nice to have a slightly better regexp for ftp: than for http: -Frank