in reply to Regular expressions
which, while it is not correct, is not unspecified. Am I misunderstanding your statement, or are you seeing something different from your code? Make sure that your examples match up to the issues you are encountering.GTTTCTCCCATCTCTCCATCGGCATAAAAATACAGAATGATC
If I run stevieb's solution, I get
which would seem to meet your spec. The bigger question is what happens for nested cases? What is your expected output forGTTTCTCCCATCTCTCCATCGGCA ATC
Also, I note a reference to codons, which implies that your tests should be considering a stride of 3 rather than an arbitrary position. Does this matter for your case?my $seq = 'ATGATGTGATGA';
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regular expressions
by Laurent_R (Canon) on Oct 26, 2015 at 20:06 UTC | |
|
Re^2: Regular expressions
by Athanasius (Archbishop) on Oct 27, 2015 at 06:27 UTC | |
by AnomalousMonk (Archbishop) on Oct 27, 2015 at 07:27 UTC |