
MrPJ
User
Mar 17, 2005, 5:30 PM
Post #3 of 7
(2802 views)
|
|
Re: [bingo11] need a hand with this one
[In reply to]
|
Can't Post
|
|
I have to get to bed now, but with a few minutes playing I ended up with:
while ($string=~ /(A+(([CGT]A+){0,2}))/g){ print " Found $1 at pos ".(pos($string)-length($1))."\n"; pos($string) = pos($string)-length($2); } ...which gives: Found ATAAAAAAGAAAAAA at pos 2 Found AAAAAAGAAAAAAGAAAAAAAAAAAAAAA at pos 4 Found AAAAAAGAAAAAAAAAAAAAAA at pos 11 Found AAAAAAAAAAAAAAA at pos 18 Found A at pos 37 Found AAAAAAAAGAGA at pos 40 Found AGA at pos 49 Found A at pos 51 Found ATAAGA at pos 55 Found AAGA at pos 57 Found A at pos 60 Found AAATAAA at pos 63 Found AAA at pos 67 ....thats not perfect as it misses out ACCAAAAAAAA, but its the best I can do for now :)
|