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

Re: [FWP] counting in REs



On Wed, Sep 08, 1999 at 09:25:53AM -0700, Rich Morin wrote:
> At 11:36 AM -0400 9/8/99, Ronald J Kimball wrote:
> >Are we talking actual _regular_ expressions here?  I think Task 3 would be
> >quite simple using positive lookahead assertions.
> 
> Please elucidate.
> 

Positive lookahead assertions allow you to apply an arbitrary number of
independent regular expressions simultaneously:

/(?=^[^a]*(?:a[^a]*a[^a]*)*$)(?=^[^b]*b[^b]*(?:b[^b]*b[^b]*)*$)/

Ronald

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