I have encountered one problem for the below input because the last character G of first line and the first character C of the next line are @allowed region. But when I get the output, G and C are not in allowed. This is because There is a space after the last character G.
my @allowed = qw[ AA AG GC GT CA CG TT TC ]; my $allowed = join "|", @allowed; my $regex = qr/ N+ | (?: (?=$allowed) . )* . /x; $data="TGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG +GGGGGGGGGGGGGGGGGGGGGATAG C"; print "$_\n" for $data =~ m/$regex/g;
ie instead to be printed as GC I get it as
which is wrong Please give a solution.G C
Edit: g0n - code tags
In reply to Re^2: Extracting a substring according to some criteria
by Benson
in thread Extracting a substring according to some criteria
by Benson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |