User documentation

Predefined patterns

The Simply API provides common Pattern constructors so application code can name intent instead of spelling standard character classes repeatedly.

The examples on this page use the TypeScript 4.0.3 Preview adapter. Run each fragment with the Core concepts setup.

Specify the alphabet

In the TypeScript facade, letter() records ASCII A–Z and a–z ranges. digit() and whitespace() record builtin classes with a Unicode domain. Use a literal range when your requirement is explicitly ASCII and inspect the plan and artifact when builtin domains matter. Position assertions such as start() and end() are separate from character constructors.

const hex = s.inChars(s.between('0', '9'), s.between('A', 'F'));
const byte = compilePattern(s.merge(s.start(), hex.rep(2), s.end()));
console.log(byte.test('AF')); // true
console.log(byte.test('AF')); // false

Registry-backed helpers

The canonical Essential-5 registry defines narrowly scoped helpers for email, URL, UUID, IP, and date-time shapes, with documented variants. The 4.0.3 TypeScript facade exposes these as email, url, uuid, ip, and dateTime. They record a governed helper identity and parameters using Simply 1.1. The Rust compiler constructs the canonical pattern. A helper declared as a lexical shape does not establish calendar validity, address reachability, or application policy compliance. Check the versioned registry.