Dear monks,

can you 'translate' the following regexp ?

/bb|[^b]{2}/

Hint: it was seen on a t-shirt, not in real code....

Solution:
To be or not to be

Do you know more puzzles of this kind?

Replies are listed 'Best First'.
Re: Regex translation puzzle
by Anonymous Monk on Jun 08, 2005 at 18:06 UTC
    if (! time()) { return ($when); } if (! $0) { return ($who); }
      2 * ( grep { /$bird/ } @hand ) == grep { /$bird/ } @bush
        Shouldn't that be:
        grep { /$bird/ } @hand ) == 2 * ( grep { /$bird/ } @bush )
        ? Or am I just not parsing it right? (highly likely ;)

        ----------
        My cow-orkers were talking in punctuation the other day. What disturbed me most was that I understood it.

Re: Regex translation puzzle
by ghenry (Vicar) on Jun 08, 2005 at 12:50 UTC

    Update:Why not join the Perl Quiz of the Week mailing list? And sorry to spoil the fun.

    You shouldn't have included the answer in your post.

    Viewing the page source or highlighting the black block reveals it ;-) Not a hard one anyway ;-)

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!

      Does perl-qotw get any traffic anymore? The webpage says the last quiz was in October, 2004.

        The last official PQOTW was in May 2005--the archives at http://perl.plover.com/~alias/list.cgi/1/ have the details. The list is faltering a bit; I'd run another QOTW but my 8-week-old daughter is consuming the few tuits I have remaining.

        There's nothing stopping you (or anyone) from joining the list and proposing (and hopefully managing) a QOTW. You may want to read this to get started.

Re: Regex translation puzzle
by kaif (Friar) on Jun 08, 2005 at 17:40 UTC
Re: Regex translation puzzle
by monarch (Priest) on Jun 08, 2005 at 13:08 UTC
    What was the question?
      "Whether 'tis nobler in the mind to suffer the slings and arrows of outrageous fortune..." or something like that.
      Well, the question(s) are the sentences with the question marks at the end.... :-)
Re: Regex translation puzzle
by ivancho (Hermit) on Jun 09, 2005 at 05:37 UTC
    arguably, this translates to , which doesn't ring the same bell (it's not covering).. a literal translation of our phrase could be //, which, on the other hand, sucks as a riddle... </obnoxious>