Re: capture strings with two non-identical capital letters in a row

2001-11-19 Thread birgit kellner
--On Sonntag, 18. November 2001 17:31 -0900 Michael Fowler <[EMAIL PROTECTED]> wrote: > On Fri, Nov 16, 2001 at 10:39:57PM +0100, birgit kellner wrote: >> How can I filter out strings which contain two (or three) non-identical >> capital letters in a row? >> >> my $string1 = "ABCD"; >> my $stri

RE: capture strings with two non-identical capital letters in a row

2001-11-18 Thread Wagner-David
#x27;s together. Wags ;) -Original Message- From: Andrea Holstein [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 17, 2001 11:58 To: [EMAIL PROTECTED] Subject: Re: capture strings with two non-identical capital letters in a row > > my $string1 = "ABCD"; > m

Re: capture strings with two non-identical capital letters in a row

2001-11-18 Thread Michael Fowler
On Fri, Nov 16, 2001 at 10:39:57PM +0100, birgit kellner wrote: > 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. The

Re: capture strings with two non-identical capital letters in a row

2001-11-17 Thread Andrea Holstein
> > my $string1 = "ABCD"; > my $string2 = "AbCd"; > my $string3 = "AABcD"; > > Get $string1, discard $string2 and $string2. > > ... > but ABBC displays as valid! > > Wags ;) What's the difference between "AABcD" and "ABBC" ?! However, I wrote a little script with two different poss

Re: capture strings with two non-identical capital letters in a row

2001-11-16 Thread A. Rivera
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:

RE: capture strings with two non-identical capital letters in a row

2001-11-16 Thread Wagner-David
but ABBC displays as valid! Wags ;) -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 14:56 To: [EMAIL PROTECTED] Subject: Re: capture strings with two non-identical capital letters in a row Birgit Kellner wrote: > > How

Re: capture strings with two non-identical capital letters in a row

2001-11-16 Thread John W. Krahn
Birgit Kellner wrote: > > 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. This will work on the data provided: while

RE: capture strings with two non-identical capital letters in a row

2001-11-16 Thread Wagner-David
Here is a shot using both regex and a for loop: sub checker { local $_ = $_[0]; # pass the data to be checked return 0 if ( /[^A-Z]/ ); # if not capital letters, get out my $MyResult = 1; my @worka = split(//,$_); # split out all the ch