simply library

STRling Simply API - Fluent Pattern Builder for Dart

This library provides a fluent, chainable API for building regex patterns without dealing with raw AST node classes. It mirrors the TypeScript reference implementation while following Dart idioms and conventions.

Example:

import 'package:strling/simply.dart';

final pattern = Simply.merge([
  Simply.start(),
  Simply.digit(3).asCapture(),
  Simply.inChars('-. ').optional(),
  Simply.digit(3).asCapture(),
  Simply.inChars('-. ').optional(),
  Simply.digit(4).asCapture(),
  Simply.end(),
]);

print(pattern.toIR()); // Outputs the IR representation

Classes

Pattern
Represents a regex pattern with fluent chainable methods.
Simply
Main entry point for the Simply API

Exceptions / Errors

STRlingError
Custom error class for STRling pattern errors.