Skip to contents

Returns the regex pattern that matches protocol IDs generated by generate_protocol_id().

Usage

protocol_id_regex()

Value

A character string containing the regex pattern.

Details

The pattern matches the format TypeCodeSequenceNumber_AbbreviatedName_CampaignAbbrev as produced by generate_protocol_id(), where:

  • TypeCode: one of S, F, E, A, or X

  • SequenceNumber: exactly two digits (zero-padded)

  • _AbbreviatedName: optional underscore + up to 15 alphanumeric characters

  • _CampaignAbbrev: optional underscore + up to 10 alphanumeric characters

Examples of valid IDs: S01_WaterSample_MyStudy, A02_LCMS_Study2024