[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] counting in REs



At 1:23 PM -0400 9/8/99, Ronald J Kimball wrote:
>Yes, it does; it requires adjacent 'a's if there are more than 2 'a's.
>The second and third 'a' must be adjacent, the fourth and fifth 'a', etc.

I don't see this, and neither does my test harness.  Running just the
first half of the test:

   for (;;) {
     print 'Next? ';
     $string = <>;
     chop $string;
     if ($string =~ /^[^a]*(a[^a]*a[^a]*)*$/)  {
       print "pass ($string)\n\n";
     } else {
       print "fail ($string)\n\n";
     }
   }

I get:

   Next? --a--a--a--
   fail (--a--a--a--)

   Next? --a--a--a--a--
   pass (--a--a--a--a--)

   Next? --a--a--a--a--a--
   fail (--a--a--a--a--a--)

FWIW, I'm running the test harness with MacPerl 5.2.0r4 on a G3 Power Mac.

-r
--
Rich Morin:          rdm@cfcl.com, +1 650-873-7841, http://www.ptf.com/~rdm
Prime Time Freeware: info@ptf.com, +1 408-433-9662, http://www.ptf.com
MacPerl: http://www.macperl.com,       http://www.ptf.com/ptf/products/MPPE
MkLinux: http://www.mklinux.apple.com, http://www.ptf.com/ptf/products/MKLP

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe