July 10, 2011
11:25 a.m.
10.07.2011 12:53, Frank Ellermann wrote:
On 10 July 2011 11:33, Mykyta Yevstifeyev wrote:
!^ftp://([^@]*)([^:/?#]*).*$!\\2!i Yes, the regexp apparently could be improved, but I don't understand the syntax details. Or rather, I see that your syntax should be okay if there is a valid "@" in the URI. Yes, there probably is a mistake here. I think the following expression will be better:
!^ftp://(([^@]*)@)?([^:/?#]*).*$!\\3!i This will also eliminate your concern below.
Why does it also work if there is no "@" at all? BTW, I think the total number of users reading this list is two. Probably that's true.
Mykyta
-Frank