in reply to Regular expression problems
$1 contains what you capture with parens: no parens here in regex, so nothing in $1.if($readingframe2 =~ /MHGR/){ print "$1\n"; ($protein)= $readingframe2 =~ /MHGR/;
example: $ perl -e '$s="pilpoil";if ($s=~/p(.)lp(.)il/) { print "h".$1."h".$2;} +' hiho
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regular expression problems
by rattytatty (Initiate) on Apr 24, 2012 at 08:22 UTC | |
by brx (Pilgrim) on Apr 24, 2012 at 14:16 UTC |