in reply to Re: search =~ for /'s
in thread search =~ for /'s

Does file://c:\ qualify as a url?

Replies are listed 'Best First'.
Re: Re: Re: search =~ for /'s
by screamingeagle (Curate) on Jun 30, 2002 at 02:42 UTC
    since file url's (like file://c:\test) also work with forward slashses instead of backslashes (file://c:/test/), how about simply replacing all backslashes with a forward slash, and then use the same regex that has been provided by caedes:
    $new =~ s/\\/\//g; $new =~ s/([^\/])$/$1\//;
Re: Re: Re: search =~ for /'s
by caedes (Pilgrim) on Jun 30, 2002 at 01:16 UTC
    Good question...

    -caedes