Skip to contents

Returns the regex pattern that matches sample IDs generated by generate_sample_id_with_components().

Usage

sample_id_regex()

Value

A character string containing the regex pattern.

Details

The pattern matches the format SiteCode-ParamAbbrev-CompartmentAbbrev-Date-R-SubsampleAbbrev as produced by generate_sample_id_with_components(), where:

  • SiteCode: one or more alphanumeric characters or hyphens

  • ParamAbbrev: up to 8 alphanumeric characters

  • CompartmentAbbrev: up to 12 alphanumeric characters

  • Date: ISO 8601 date (YYYY-MM-DD)

  • R: literal separator character

  • SubsampleAbbrev: one or more alphanumeric characters

Example: SITE-001-Copper-AquaticSedi-2023-03-15-R-1