[Bioperl-l] Sequence matching problem!
enrique_rulz at yahoo.com
Thu Feb 22 15:41:37 EST 2007
I m facing a great deal of problem in simple pattern matching between
sequence & a pattern ..Program shod be designed such a way that it shod be
able do two things 1) normal matching...For eg: GATCAAT....if TC is
entered... output shod be 2...2) matching using spl character..In same
example if C*T value is entered It shod give o/p as 3 & seq to b displayed
is CAAT..I m easily getting 1st part...But in 2nd part Its giving sum
problem..output I m gettin as 1 instead of 3...Code is really simple!
$alphabet = "GATCAAT";
$pattern= "C*T ";
$alphabet =~ /($pattern)/i;
print "The entire '$pattern' match began at $- and ended at $+\n";
The entire C*T match began at 1 and ended at 2
but the o/p shod be 3????
& Is there n e chance I can get seq too..I mean instead of C*T'' i need
Well..Its not compulsion to use regex....But I find it quite simple..can
there be n e other method??
Thanx in advance!
View this message in context: http://www.nabble.com/Sequence-matching-problem%21-tf3275153.html#a9107936
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
More information about the Bioperl-l