regExp static method

AskValidator regExp(
  1. String regExp, {
  2. String? error,
})

Validates the input against a regular expression

ask('Variable Name:', validator: Ask.regExp(r'^[a-zA-Z_]+$'));

Implementation

static AskValidator regExp(String regExp, {String? error}) =>
    _AskRegExp(regExp, error: error);