2009/2/10 Gunnar Hjalmarsson <nore...@gunnar.cc>:
> Dermot wrote:
>>
>> I am trying to create a regex to match a directory name in path string
>>
>>  my $dir = dirname(shift);
>>  (my $code) = ($dir =~ m|track.(\w{3}).|);
>>  return $code;
>
> An unescaped . in a regex matches any character except a newline. I suppose
> you meant m|track\.(\w{3})\.|

I know. I meant any character. The pattern was a unix path so '/track/aaa/'
Thanx,
Dp.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to