Skip to content

Regexp model

flexr compiles regular languages into an automaton. Literals, concatenation, alternation, greedy *, +, ?, bounded repetition, character classes, and supported Unicode properties are the useful core.

ConstructStatusAlternative
Literal, concatenation, alternationSupported
*, +, ?SupportedGreedy matching
{n,m}SupportedKeep bounds explicit
Lookahead / lookbehindUnsupportedfollowed_by: or a state/action
BackreferencesUnsupportedSplit the rule or validate in an action
Open repetition {n,}UnsupportedUse a separate rule/action
Capturing groupsAccepted with a diagnosticUse (?:...) for intent

Run flexr check before relying on a construct. The regexp reference records the implementation-level boundaries.