The point of all this

topic posted Mon, August 30, 2004 - 11:12 AM by  Unsubscribed

I made this tribe mostly because it sounded like a clever name, and partially because it sounded like a good Tribe idea to have geeks who were also into other creative forms like bands, or painting or whatever.
posted by:
Unsubscribed
  • Unsu...
     

    Re: The point of all this

    Mon, August 30, 2004 - 1:37 PM
    The point of this is to come up with a regex that will extract a thousand monkeys from the works of shakespear.
    • Unsu...
       

      Re: The point of all this

      Mon, August 30, 2004 - 3:35 PM

      You could write one that would find the sequential letters 'monkey' with anything at all in between them, line up the text works of Shakespeare and see how many come up.
      • Re: The point of all this

        Wed, November 10, 2004 - 10:48 AM
        I'll bite... =)

        my $prv = undef;
        my @order = ('m','o','n','k','e','y');
        my %pos = map { $order[$_] => $_ } (0..$#order);

        sub monkey {

        my $e = $_[0] eq 'y' ? ' ' : '';

        $prv = $#order if(!defined($prv));
        my $p = $pos{$_[0]};

        if( ($prv == $#order && $p == 0) ||
        $prv == ($p - 1) ) {
        print("$_[0]$e");
        }

        $prv = $p;
        }

        $input =~ s/[monkey]/&monkey(lc($1))/ige;

        OK, so that's a bit of cheating - considering the RE does little work, but you could certainly put the block into the RE its self.

        !c

Recent topics in "Abstract Regular Expressionism"

Topic Author Replies Last Post
Be jackson pollock, (without dimension) Unsubscribed 0 June 13, 2006
The Scream Unsubscribed 1 June 6, 2005
Gunman kills 7 at church meeting Unsubscribed 5 June 5, 2005
Anyone in Brooklyn? Unsubscribed 5 June 5, 2005