Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: regexp question

by hawson (Monk)
on Feb 12, 2002 at 02:04 UTC ( [id://144759]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
     
    my $path='/tmp/foo';
    my @ex=('/tmp/foo', '/tmp/foo/', '/tmp/foo/bar', '/baz/tmp/foo/', '/tm
    +p/food');
     
    print join(" ", grep( /^$path(?=(\/[\w\/]*|$))/, @ex)), "\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-20 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found