digitRegExp property

RegExp digitRegExp
final

Regular expression pattern to validate digits.

This pattern matches strings that consist of at least one digit.

Example:

static final RegExp digitRegExp = RegExp(r'\d');
  • Matches: '0', '1', '123', 'a1b2c3', '12.34'
  • Does not match: 'abc', '+-'

Implementation

static final RegExp digitRegExp = RegExp(r'\d');