Regular Expressions 101

Community Patterns

Illumina sample ID regex

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?!(-|_))(?!.*(--|__))[A-Za-z0-9-_]+(?<!(-|_))$
/
gm

Description

regular expression for illumina sequencer sample ids. sample Ids are alpha numeric with no more than two dashes or underscores and no underscores or dashes in the beginning or end of the sample id.

Submitted by anonymous - 2 years ago