Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?P<reference_sequence>(NM|NR|XM|XR)_[0-9]{4,12}|ENST[0-9]{1,11})(\.(?P<version>([0-9]?[0-9])))?(:(?P<prefix>c|n)\.(?P<start>-?[1-9][0-9]{0,7})(?P<start_offset>[+-][1-9][0-9]{0,7})?(?P<ref>[ACTG])>(?P<alt>[ACTG]))?
/
gm

Description

This Regex will match simple RNA substitution following HGVS nomenclature

Submitted by anonymous - 2 years ago