#!/usr/bin/perl -w use strict; my $dna = 'atctcggataatgggataaaaatataggctataaatggcgccccggctaattttt'; if ($dna =~ /atg([acgt]+)(?!(taa|tag|tga))/xms) { print $1; } [download]
In reply to Simple regex question. Grouping with a negative lookahead assertion. by Anonymous Monk