Regular Expressions 101

OmegaT Project Name (Pattern)

Open Workspace
  • PCRE2 (PHP)
  • Match
1

Regular Expression

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

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