in reply to getting a sequence of numbers and leters
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';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: getting a sequence of numbers and leters
by shabird (Sexton) on Mar 24, 2020 at 07:06 UTC |