Build, test, and debug regular expressions
This regular expression is designed to extract UniProt accession codes from FASTA file headers in multiline text. It specifically targets entries starting with either "sp" (Swiss-Prot) or "tr" (TrEMBL) followed by a pipe character, capturing the subsequent alphanumeric ID into a group. The `gm` flags ensure it processes every line and respects line boundaries, while lookaheads and delimiters safely isolate the exact database identifier. This is highly useful for bioinformatics workflows needing to parse large protein databases.