I don`t know if this is Craft, or a hack, I DO know that it comes in handy (For me, since I am not a complete master of regular expressions (not until japhy's) book at least ;)) I am sure there is something like this out there, but I haven`t bothered to look (sometimes it is just more fun to do something yourself ;) What does it do ? It draws you a little Tk window, and allows you to enter a string and let a RegEx loose on it. Dynamically the result of the RegEx is shown, and updated, so you can see exactly what the result is of a change in the RegEx, or the string. TODO: - Do something about that UI! ;) - Put an another eval in the function so $1..n are really 1..n, instead of 1..5 ;) - Support for @+ @- - Clean up code ;) - Loads of stuff Code will be updated soon, I hope ;) Update: Implemented List context feature, as suggested by Jepri The Code: #!/usr/bin/perl -w use strict; use Tk; sub KeyPress; my $MW=MainWindow->new; my $AsList; my %Border=qw(-relief raised); my %Fill=qw(-fill both); my $Top =$MW->Frame->pack(-side=>'top'); my $TopLeft =$Top->Frame(%Border)->pack(-side=>'left'); my $TopRight =$Top->Frame(%Border)->pack(-side=>'left'); my $RegLabel=$TopLeft->Label(%Border,-text=>'RegExp')->pack(%Fill); my $TextLabel=$TopLeft->Label(%Border,-text=>'Text')->pack(%Fill); my $AsListBox=$Top->Checkbutton(-text=>'List context',-variable=>\$AsList,-command=>\&KeyPress)->pack(); $Border{-bd}=1; my $RegExp=$TopRight->Entry(-width=>30)->pack(); my $Text=$TopRight->Entry(-width=>30)->pack(); my $ResultTextFrame =$MW->Frame(%Border)->pack(-side=>'left'); my $ResultTextLabel=$ResultTextFrame->Label(-justify=>'left',-text=>"PreMatch:\nMatch:\nPostMatch:\nResult:\n\$1..n")->pack(%Fill); my $ResultFrame =$MW->Frame(%Border)->pack(-side=>'left',%Fill); my $ResultLabel=$ResultFrame->Label(-justify=>'left',-text=>"none\nnone\nnone\nnone")->pack(%Fill); $MW->bind('all', '', \&KeyPress); MainLoop(); sub KeyPress { local $^W=0; my $RegEx=$RegExp->get; my $Text =$Text->get; my (@Dollar,@Result,$Result,$Match,$PreMatch,$PostMatch); my $Function; my $FieldCodes=join "",'$Match=$&;', '$PreMatch=$`;', "\$PostMatch=\$';", "\$Dollar[0]=\$1;", "\$Dollar[1]=\$2;", "\$Dollar[2]=\$3;", "\$Dollar[3]=\$4;", "\$Dollar[4]=\$5;"; if (!$AsList) { $Function=join "",'($Result=$Text)=~',"$RegEx;",$FieldCodes; } else { $Function=join "",'@Result=($Text=~',"$RegEx);",$FieldCodes; }; eval $Function; $Result||=join "|",@Result; $Match||='none'; $PreMatch||='none'; $PostMatch||='none'; $ResultLabel->configure(-text=>"$PreMatch\n$Match\n$PostMatch\n$Result\n@Dollar"); $ResultLabel->update; };