Here is what I wrote for two non-identical...

@letters=split(//, $input);
for $a(0..$#letters)
{
     if ($letters[$a] ne $letters[$a+1] && $letters[$a] =~ /[A-Z]/ &&
$letters[$a+1] =~ /[A-Z]/)
      {
          print $input;
          last;
      }
}

Agustin

----- Original Message -----
From: "birgit kellner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 16, 2001 1:39 PM
Subject: capture strings with two non-identical capital letters in a row


> How can I filter out strings which contain two (or three) non-identical
> capital letters in a row?
>
> my $string1 = "ABCD";
> my $string2 = "AbCd";
> my $string3 = "AABcD";
>
> Get $string1, discard $string2 and $string2.
>
>
> Birgit Kellner
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to