> -----Original Message-----
> Behalf Of Pankaj Agarwal
>
> Hi All,
>
> I am using following code block
>
> if($data =~ /,(\w{1,}\s{0,}){1,}\n/){
> print $&;
> }
>
> now if $data is ", a and b" the pattern matches but if
> it is ",a & b" it doesn't how can I avoid the special
> meaning of &
>
Not sure what you mean by the "special meaning of &" but the following works
if($data =~ /,((\&|\w+)\s*)+\n/)
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs