I need a RegEx (!!!with modify(m//)) what matches the words what ends with 'a'.
=============================
I have a test_file (for ex.:)
=============================
beforematchafter
wilma and nana
Mrs. Wilma Flinstone hommie
barney
wilma&fred      
wilmafred
flinstone
mama&fred
==============================
my_program.pl
==============================
#!/usr/bin/perl -w
use strict;
my $i=1;
while (<>) {            # take one input line at time
        chomp;  
        if (/(\b\w*a\b)/) {
                print "$1 found in line $i\n"; 
                $i++;
        } else {
                $i++;
        } 
}
==================================
This program does not match 'nana' line 2 (only wilma) and it DOES atch 
'wilma&fred' line 5 and line 8 (I think it shouldn't)...
And is the sign '&' in \w ?? I thought that \w == [a-zA-Z0-9_] or it isn't???
==================================

-- 
Thanks,
            Monomachus 
------------------------
Don't worry, Be Happy


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to