Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Think about Loose Coupling
 
PerlMonks  

Re: regular expression for workdir

by Dietz (Curate)
on Jan 01, 2006 at 15:37 UTC ( #520248=note: print w/ replies, xml ) Need Help??


in reply to regular expression for workdir

This would be more straightforward than the other suggestions:

my ($subpath) = $path =~ m|$magic_word/(.*)/.*|; print $subpath, $/;

Update:

Rereading the question, I misinterpreted it, since my solution will gather all directories after the magic word.
Go with wfsp's solution which fits in perfectly.


Comment on Re: regular expression for workdir
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2014-04-21 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls