Your second regex never matches which is why both are the same. As stated, here's a potential solution.
use strict; use warnings; use Test::More tests => 2; my $content = 'BOGUS PPI3_SYNY3 276 aa linear BCT 13-NOV-2019'; $content =~ /^(BOGUS\s+\S+)/; is $1, 'BOGUS PPI3_SYNY3'; $content =~ /(\d+\s\w+) linear/; is $1, '276 aa';
In reply to Re: getting a sequence of numbers and leters
by hippo
in thread getting a sequence of numbers and leters
by shabird
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |