regMatch method

bool regMatch(
  1. RegPattern regPattern
)

Sample

void main(){
  bool isValidEmail = 'sample@gmail.com'.regMatch(RegPatterns.isEmail);
  print(isValidEmail)
}

Use RegPatterns library for RegPattern

Implementation

bool regMatch(RegPattern regPattern) => RegPattern.regMatch(this, regPattern);