digit method

FluentRegex digit([
  1. Quantity quantity = const Quantity.oneTime()
])

Appends digit, same as 0-9

Example: var regex = FluentRegex().digit(); expect(regex.hasMatch('l'), false); expect(regex.hasMatch('W'), false); expect(regex.hasMatch('5'), true); expect(regex.hasMatch('_'), false); expect(regex.hasMatch('%'), false);

Implementation

FluentRegex digit([Quantity quantity = const Quantity.oneTime()]) =>
    FluentRegex._copyWith(this, expression: '$_expression\\d$quantity');