Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: search =~ for /'s

by screamingeagle (Curate)
on Jun 30, 2002 at 02:42 UTC ( #178298=note: print w/ replies, xml ) Need Help??


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

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


Comment on Re: Re: Re: search =~ for /'s
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (20)
As of 2015-07-06 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls