sharanbas raghapur wrote:
> Solutions from both Bill and Magnus work perfectly.
> I had some questions though in Bills solution ....
>
>
>>my ($str) = /print\s+"(.*)"/; # may suck an embedded "
>
>
> 1) For regex above, is the multiple word match due to .*
Yes - that will gobble up everything in sight until the last " it finds.
> 2) Is the main purpose of putting $str in brackets ia to get the matching
> value in brackets in right hand side of regex?
Yes - and we call those parens - these are brackets [] and braces {}. :)
--
,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED]
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (Free site for Perl/Lakers)
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs