# Field(pattern=) with lookahead raises SchemaError 'look-around, including look-ahead and look-behind, is not supported' when the type is built (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/field-pattern-with-lookahead-raises-schemaerror-look-around-including-look-ahead-and-look-behind-is-c49d601fda45
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, regex, pattern

TypeAdapter(Annotated[str, Field(pattern=r'^(?=a)a')]) raised SchemaError: Error building "str" validator ... regex parse error ... error: look-around, including look-ahead and look-behind, is not supported. Python 3.12.10, Windows 11.
