in reply to dir match, dir may or may not appear
In your regex [^/]+{0,1} does not make sense if I understand it correctly, basically you say
anything but a slash, at least one time, then you say at least 0 time at most 1... you gotta choose which you want, either it is
[^/]+ or [^/]? (equivalent to {0,1}) For what you want to do I'd say: m#\A/usr/([^/]+/)?bin#
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: dir match, dir may or may not appear
by hellosarathy (Novice) on Jan 12, 2016 at 10:18 UTC | |
by hippo (Bishop) on Jan 12, 2016 at 10:34 UTC |
In Section
Seekers of Perl Wisdom