Community Patterns

Community Library Entry

1

Regular Expression
Created·2026-02-03 16:49
Flavor·PCRE2 (PHP)

/
^(?<program>[a-z]+)_(?<cycle>[a-z0-9-]+)_(?<batch>[A-Za-z0-9-]+)_(?<locale>[A-Za-z0-9-]+)_(?<suffix>omt|t[12]|rec)$
/
gm
Open regex in editor

Description

Regex showing how to match the five parts in an OmegaT project name (named as per the internal convention at cApStAn), including labels for each captured group (each part in the name).

Submitted by msoutopico