develooper Front page | perl.fwp | Postings from March 2005

Re: Self-recognizing programs and regular expressions

Thread Previous
Jasvir Nagra
March 7, 2005 16:24
Re: Self-recognizing programs and regular expressions
Message ID:

In my first draft of the problem I had specifically disallowed
infinitely long strings (afterall "print "print "print ... is not a
valid quine) but I must have foolishly dropped it in one of the

I'll accept infinitely long solutions as soon as we have a cpan module
that allows infinitely long regex.  :)

On Mon, 2005-03-07 at 23:05 +0000, Ton Hospel wrote:
> Ah, the idea seems salvagable, but less elegant:
> this sequence is self matching:
> ^
> ^\^
> ^\^\\\^
> ^\^\\\^\\\\\\\^
> ....
> so an infinite sequence of ^ with 2**n-1 \ after the n-th ^
Jasvir Nagra

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About