I have a file in which i have the following line
BOGUS PPI3_SYNY3 276 aa linear BCT 13-NOV-2019
I want to extract BOGUS PPI3_SYNY3 and "276 aa" using regular expression. my code is as follows
$content =~ /BOGUS\s+([A-Z0-9_]+)/; $bogus = $1; $noOfAcids =~ /\s+([0-9\sa-z]$)/; $acids = $1 ; print("bogus: $bogus\nNumber of acids:$acids\n
but unfortunately both regex gives the same output.
OUTPUT
bogus: PPI3_SYNY3
Number of amino acids:PPI3_SYNY3
In reply to getting a sequence of numbers and leters by shabird
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |