regMatch method
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);