A Type-safe DSL for building regular expressions in Dart using composable building blocks.
final DartRegex emailPatternDSL = DartRegex([
CaptureGroup(
OneOrMore(Word()),
),
CharacterSet('@'),
CaptureGroup(
OneOrMore(
AtomGroup(
[Word(), CharacterSet('.'), Word()],
),
),
),
]);
Word()
Digit()
Whitespace()
AnyCharacter()
CharacterSet()
AtomGroup()
ZeroOrMore()
OneOrMore()
ZeroOrOne()
Exactly()
Range()
CaptureGroup()
Feel free to file issues, this is under development, so expect breaking changes till 1.0.0