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

RE: [FWP] counting in REs



At 12:04 PM -0400 9/8/99, WORENKLEIN, David, GCM wrote:
>Hint: #3 is just as easy as #1 and #2.

Ahem.  This is _almost_ the approach I suggested; here's mine:

   $string =~       /^[^a]*(a[^a]*a)*[^a]*$/ &&
   $string =~ /^[^b]*b[^b]*(b[^b]*b)*[^b]*$/;

-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