Test, validate and match regular expressions
This regular expression parses frameshift variants in protein sequences following HGVS (Human Genome Variation Society) nomenclature. It extracts the reference sequence identifier (like NP, XP, or WP), version, and details of the amino acid change, including the position and new terminal codon. It is heavily used in bioinformatics and genomics for validating and annotating genetic mutations.