ErrorsValues and types · rule
type.invalid_pattern
Pattern is not a supported regular expression.
Area 2, Values and types; not declinable; the next step is usually the agent's.
A pattern must match the whole text and uses a subset of regular expressions without backreferences or lookaround (question 9):
type Doubled = Text { pattern: "(a+)+\\1"}
error This pattern can't be used
--> main.jadpo:2:14
|2 | pattern: "(a+)+\\1" | ^^^^^^^^^^ backreferences are not allowed
- reason
- A pattern is a regular expression that must match the whole text, without backreferences or lookaround, so it runs in linear time and the same way on every target.
- next
- Rewrite the pattern without the unsupported part (agent)
- rule
- type.
invalid_ pattern - help
- https://jadpo.
dev/docs/errors/type. invalid_ pattern
Markdown for agents: /docs/errors/type.invalid_pattern.md.Built from Jadpo main at aee2e8f.