PureXML/Sources/Regex
Mihaela Mihaljevic f5c04058dc feat(regex): Unicode category escapes and character-class subtraction
Close the two XSD-regex gaps from the audit:

- \p{...} and \P{...} now resolve Unicode general categories (one-letter
  groups like \p{L} and two-letter codes like \p{Lu}/\p{Nd}) through
  Swift's own scalar generalCategory, so no character tables are vendored.
  A curated set of well-known \p{Is<Block>} blocks is supported; an
  unknown category or block name is a compile error rather than a guess.
- Character-class subtraction [a-z-[aeiou]] removes the subtrahend from a
  class, and nests ([a-z-[b-d-[c]]]) and composes with categories.

Categories and subtraction work both as standalone atoms and inside
character classes, so XSD pattern facets that use them now validate.

Closes #89
2026-06-08 15:15:46 +02:00
..
RegexAutomaton.swift feat(regex): Unicode category escapes and character-class subtraction 2026-06-08 15:15:46 +02:00
RegexCategory.swift feat(regex): Unicode category escapes and character-class subtraction 2026-06-08 15:15:46 +02:00
RegexParser.swift feat(regex): Unicode category escapes and character-class subtraction 2026-06-08 15:15:46 +02:00
RegexSyntax.swift feat(regex): Unicode category escapes and character-class subtraction 2026-06-08 15:15:46 +02:00