#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd /; my $line7 = q{ CDS join(2432..2501,5144..5154,57 /translation="MLSFVDTRTLLL" exon 2432..2501 }; my $amino_acid_seq; { use re 'debug'; ($amino_acid_seq ) = $line7 =~ m/^\s+\/translation\=\"(.*?)\"/s; } dd( $amino_acid_seq ); { use re 'debug'; ($amino_acid_seq ) = $line7 =~ m/^\s+\/translation\=\"(.*?)\"/ms; } dd( $amino_acid_seq ); __END__ Compiling REx "^\s+/translation\=\%"(.*?)\%"" Final program: 1: SBOL (2) 2: PLUS (4) 3: SPACE (0) 4: EXACT (9) 9: OPEN1 (11) 11: MINMOD (12) 12: STAR (14) 13: SANY (0) 14: CLOSE1 (16) 16: EXACT <"> (18) 18: END (0) floating "/translation=%"" at 1..2147483647 (checking floating) anchored(SBOL) minlen 16 Compiling REx "^\s+/translation\=\%"(.*?)\%"" Final program: 1: MBOL (2) 2: PLUS (4) 3: SPACE (0) 4: EXACT (9) 9: OPEN1 (11) 11: MINMOD (12) 12: STAR (14) 13: SANY (0) 14: CLOSE1 (16) 16: EXACT <"> (18) 18: END (0) floating "/translation=%"" at 1..2147483647 (checking floating) anchored(MBOL) minlen 16 Guessing start of match in sv for REx "^\s+/translation\=\%"(.*?)\%"" against "%nCDS join(2432..2501,5144..5 154,57%n "... Found floating substr "/translation=%"" at offset 68... Guessed: match at offset 0 Matching REx "^\s+/translation\=\%"(.*?)\%"" against "%nCDS join(2432..2501,5144..5154,57%n "... 0 <> <%nCDS > | 1:SBOL(2) 0 <> <%nCDS > | 2:PLUS(4) SPACE can match 1 times out of 2147483647... failed... Match failed undef Guessing start of match in sv for REx "^\s+/translation\=\%"(.*?)\%"" against "%nCDS join(2432..2501,5144..5 154,57%n "... Found floating substr "/translation=%"" at offset 68... Position at offset 0 does not contradict /^/m... Guessed: match at offset 0 Matching REx "^\s+/translation\=\%"(.*?)\%"" against "%nCDS join(2432..2501,5144..5154,57%n "... 0 <> <%nCDS > | 1:MBOL(2) 0 <> <%nCDS > | 2:PLUS(4) SPACE can match 1 times out of 2147483647... failed... Guessing start of match in sv for REx "^\s+/translation\=\%"(.*?)\%"" against "CDS join(2432..2501,5144..515 4,57%n "... Found floating substr "/translation=%"" at offset 67... Position at offset 0 does not contradict /^/m... Guessed: match at offset 0 1 <%n> | 1:MBOL(2) 1 <%n> | 2:PLUS(4) SPACE can match 0 times out of 2147483647... failed... Guessing start of match in sv for REx "^\s+/translation\=\%"(.*?)\%"" against "DS join(2432..2501,5144..5154 ,57%n "... Found floating substr "/translation=%"" at offset 66... Found /^/m at offset 45... Guessed: match at offset 45 47 <4,57%n> < > | 1:MBOL(2) 47 <4,57%n> < > | 2:PLUS(4) SPACE can match 21 times out of 2147483647... 68 < > | 4: EXACT (9) 82 | 9: OPEN1(11) 82 | 11: MINMOD(12) 82 | 12: STAR(14) SANY can match 12 times out of 12... 94 <"%n > | 14: CLOSE1(16) 94 <"%n > | 16: EXACT <">(18) 95 <%n > | 18: END(0) Match successful! "MLSFVDTRTLLL" Freeing REx: "^\s+/translation\=\%"(.*?)\%"" Freeing REx: "^\s+/translation\=\%"(.*?)\%""