30 Regular expressions library [re]

30.2 Definitions [re.def]

The following definitions shall apply to this Clause:

collating element

a sequence of one or more characters within the current locale that collate as if they were a single character.

finite state machine

an unspecified data structure that is used to represent a regular expression, and which permits efficient matches against the regular expression to be obtained.

format specifier

a sequence of one or more characters that is to be replaced with some part of a regular expression match.


a sequence of zero or more characters is matched by a regular expression when the characters in the sequence correspond to a sequence of characters defined by the pattern.

primary equivalence class

a set of one or more characters which share the same primary sort key: that is the sort key weighting that depends only upon character shape, and not accents, case, or locale specific tailorings.

regular expression

a pattern that selects specific strings from a set of character strings.


a subset of a regular expression that has been marked by parenthesis.