thanks.

it seemed to like the [] better.

while (<FILE>)
                {

                print "$_" if /[\.\,\?]$/;

                }
close(FILE);




>From: "Moon, John" <[EMAIL PROTECTED]>
>To: 'David Draley' <[EMAIL PROTECTED]>
>CC: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: RE: reg exp
>Date: Thu, 20 Sep 2001 12:58:56 -0400
>
>Try
>
>open (FILE, "$file") or die 'Open failed';     # where $file = 'some path
>and/or file name'
>while (<FILE>) {
>       print "$_" if /\.\?$/;  #       the only the last character of the
>line is a <.,?> !
>       }
>
>hope this give you some ideas ...
>
>-----Original Message-----
>From: David Draley [mailto:[EMAIL PROTECTED]]
>Sent: September 20, 2001 12:35
>To: [EMAIL PROTECTED]
>Subject: reg exp
>
>
>hello -
>
>I am trying to search a <file> for any sentence that ends in "." or "?"  I
>want to only print those sentences that end with "." or "?" I am having
>trouble with the reg expression syntax...
>
>------------------
>
>while (<file>)
>     {
>$file=<file>;
>        if(/\.\?$/){
>          print "$only_sentences_that_end_with_._or_?";
>       }
>     }
>
>-----------------
>
>thanks
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to