Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: regular expression for workdir

by Dietz (Curate)
on Jan 01, 2006 at 15:37 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found