in reply to Re^2: Regex question
in thread Regex question
Or, to mirror the constraints in the OP's regex:
m{^.* / ([\w-]+) / .*\.txt}x
Also, the form:
my $dir; $dir = $1 if ##regex_here##
is a good idiom to become familiar with.
Updates:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regex question
by tlm (Prior) on Aug 19, 2005 at 17:45 UTC |