Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: search =~ for /'s

by BrowserUk (Pope)
on Jun 29, 2002 at 23:21 UTC ( #178283=note: print w/ replies, xml ) Need Help??


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

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


Comment on Re: Re: search =~ for /'s
Download Code
Re: Re: Re: search =~ for /'s
by caedes (Pilgrim) on Jun 30, 2002 at 01:16 UTC
    Good question...

    -caedes

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\//;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://178283]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (17)
As of 2014-07-10 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (214 votes), past polls