Re: searching for a string

2003-03-19 Thread Octavian Rasnita
k sony" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 19, 2003 8:48 AM Subject: searching for a string Hi I was trying the following code : open ( fh , "test1.txt"); while () { $string = "the lucky coin"; if ($string =~ m/(\b)the(\s)(\b)lucky(

searching for a string

2003-03-18 Thread mark sony
Hi I was trying the following code : open ( fh , "test1.txt"); while () { $string = "the lucky coin"; if ($string =~ m/(\b)the(\s)(\b)lucky(\s)(\b)coin(\b)$/) { print "Yup,exists.\n"; } else { print "nope \n"; } } But the results are not as expected. I was thinking of the following : search for "