This is as far as I got:
^(?=.{65}Q\\1E\\\)\z)(\Q^(?=.{65}Q\\1E\\\)\z)(\E)\\Q\1\\E\)
It is a true inequ of sorts. However, it uses \Q, which is a quoting
construct, not a regex construct. So it doesn't work as $x =~ /$x/,
only as $x =~ eval(qr/$x/):
chomp(my $x = 'EOF');
Here's one without \Q, which I'm fairly certain is score 1:
On Monday, March 7, 2005, Jasvir Nagra wrote:
The par entry is:
Entry Score
^.{6}$ 255^6
Strictly speaking that would be 2 * 255^6 because of the optional
trailing newline. Still, it's better than ^.{7}\z with 255^7.
On Thursday, December 16, 2004, Brad Greenlee wrote:
The original python version never actually sends the password in any
form; I believe it just uses it to hash the server url, which gets
passed as a parameter. The server then just hashes its own url with its
password to see if they match.
How about
/.*?$sep|.+|^\z/sg
Seems to work alright for empty file as well as incomplete lines,
without producing bogus empty lines.
- Karsten
I couldn't figure out a Perl-ish way of parsing it,
resorting to putting it all in a big 2D array and
scurrying around it. With lots of consistency
checking it takes about 5s to run on my 1.6GHz box
(yikes).
The problem is very similar to PCB tracks in electronics. The tracks are
the
Piers and Karsten both found shorter multi-line solutions:
Piers:
Grr... that one line rule is *so* silly:
#!/usr/bin/perl -p0
$_=$1while/
(.+)^/ms
Karsten:
#!/usr/bin/perl -p0
$_=$1while/
(.*
)./s
Both of these are really 25 chars (counting the \n's within the program as
one char
*** Eugene van der Pijll: 89 (11 19 13 25 21) ***
--- rev.pl -
#!/usr/bin/perl -p
$\=$_.$\}{
That's just *beautiful*. I just couldn't see past 'print reverse'.
I've been wondering for hours now how he keeps $_ from being
destroyed by the last