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

Re: [FWP] japhy had a silly idea...




On Mon, 28 May 2001, Michael Salmon wrote:

> On Sat, May 26, 2001 at 06:11:24PM -0400, Ronald J Kimball wrote:

> > Anyway, here's a degenerate regex that includes + but matches a finite set
> > of strings:
> >
> > /a+^/
>
> that matches an unbounded set of strings. remember, there is more then 1
> infinity. there are infinite infinities!
>
> a aa aaa aaaa aaaaa .................................... (infinity)

Not so.  Ronald's regexp matches a finite set of strings: the empty set
(at least as written without any m// modifiers).

$a = 'a';
print "Huh?\n" if $a =~ /a+^/;

-Aaron


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