I have a long html text. For this text I want to get all database Identifiers (4 letters, beginning with a digit (not 0)) e.g 1TGS These IDs are introduced by the database name (PDB) e.g. PDB ID 1TGS || PDB code ID 1TGS || PDB 1TGS. These terms can occure multiple times in the text. $string = "<html>Test text PDB code ID 1TGS 1O6S 1TGS bla bla \nPDB codebut how to get all IDs?? Thanks in advance! Yours Murcia
1ILW 1ILV"; I want to get all these IDs. this is not correct: while($string=~/(?<=PDB).+?([1-9][A-Z0-9]{3})/g){ print $1, "\n";}
In reply to Regexp find all matches by Murcia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |