On Tue, Mar 08, 2005 at 00:56 +0100, Abigail wrote:
> Years ago, while I was still writing JAPHs, I was looking for a regex
> matching itself - and nothing but itself (regexes that match themselves,
> and also other strings are easy and IMO, not interesting), but I never
> found one. The search wasn't entirely fruitless, it did lead to:
> 
>        my $qr =  qr/^.+?(;).+?\1|;Just another Perl Hacker;|;.+$/;
>           $qr =~  s/$qr//g;
>     print $qr, "\n";
> 
> 
> But that's a far cry from what I wanted to find.

What about this one?

^(??{$b=q(^(??{$b=q(%s);quotemeta(sprintf$b,$b)})\z);quotemeta(sprintf$b,$b)})\z

CU,
    Sec
-- 
In 1968 it took the computing-Power of 2 C-64 to fly a rocket to the moon.
Now, 1997 it takes the Power of a Pentium 133 to run Microsoft Windows 95.
                    Something must have gone wrong.

Attachment: pgpxdW5o7Nw4v.pgp
Description: PGP signature

Reply via email to