T
tony
Hi,
I am searching for alternative patterns and had a problem w.r.t
extracting the pattern matched. Here is the code.
$string = "AAAACGTTTTTCTTGAGTTCAGTTTTTAnTC";
while ($string=~
/((GAA|GAG)(TTT|TTC)(TCT|TCC|TCA|TCG|AGT|AGC))|((CGT|CGC|CGA|CGG|AGA|AGG)(TTT|TTC)(TCT|TCC|TCA|TCG|AGT|AGC))/g){
$where = pos($string);
print $1." ".$where,"\n";
}
Ideally it should print the matched entry and the corresponding
position of occurence. However the match CGTTTTTCT is not printed
Output
13
GAGTTCAGT 23
I know it is very simple but i am not realizing where i am making the
mistake.
I would really appreciate if somebody could help me.
Thanks,
tony
I am searching for alternative patterns and had a problem w.r.t
extracting the pattern matched. Here is the code.
$string = "AAAACGTTTTTCTTGAGTTCAGTTTTTAnTC";
while ($string=~
/((GAA|GAG)(TTT|TTC)(TCT|TCC|TCA|TCG|AGT|AGC))|((CGT|CGC|CGA|CGG|AGA|AGG)(TTT|TTC)(TCT|TCC|TCA|TCG|AGT|AGC))/g){
$where = pos($string);
print $1." ".$where,"\n";
}
Ideally it should print the matched entry and the corresponding
position of occurence. However the match CGTTTTTCT is not printed
Output
13
GAGTTCAGT 23
I know it is very simple but i am not realizing where i am making the
mistake.
I would really appreciate if somebody could help me.
Thanks,
tony