#!/usr/bin/perl -w use strict; my @words = qw(COMA STORAMA HISTOROMA PUMA MELANOMA STOROMA); for my $str ( @words ) { if ($str =~ /OMA$/ and $str !~ /STOROMA$/ ) { print "$str\n"; } }
------------------------------------------------------------
"Perl is a mess
and that's good because the
problem space is also a mess." - Larry Wall
In reply to Re: regular expressions
by dvergin
in thread regular expressions
by asaf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |