Friday afternoon blag fest

Philippe Bruhat (BooK) philippe.bruhat at
Fri Sep 21 13:33:19 BST 2007

On Fri, Sep 21, 2007 at 01:11:53PM +0100, Chris Jack wrote:
> What's the longest regular expression anyone's ever written? Choose
> your own criteria for longest (e.g. #lines, #characters) although I
> suspect pitifully slow might get less respect from the audience....

I wrote a 10k one once, although of course I didn't write it. I just had
a program load the strings I wanted to find, quote stuff and replace ' '
with '\s*', and then join the whole bunch with '|'. The resulting regexp
length was over 10000, though I don't remember the details.

I was looking for the original emails to add date attribution to the 
Paris Perl Mongers $A++ page. That means grepping for mildly obfuscated
code while allowing for slight variations.

Nowadays we just add the dates at the same time we add the code, which
is much easier. :-)

 Philippe Bruhat (BooK)

 To flaunt your strength is to make it your weakness.
                                    (Moral from Groo The Wanderer #25 (Epic))

More information about the mailing list