Dear Nilanjan,
> If I used a RE like the following:
>
> $dir =~ m,^(.*)/($fruits)/,;
>
> I get a greedy match, upto & including the last occurrence. Is there a
> RE to get the path up to the first occurrence of any one of the
> alternatives?
Doesn't non-greedy quantification solve your problem?
> $dir =~ m,^(.*?)/($fruits)/,;
Or have I mis-understood the problem?
peace, || Udayachal: a newspaper edited by slum children:
--{kr.pA} || http://tinyurl.com/57jaf
--
This .sig intentionally left blank.
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm