rfc_6531 1.0.0 copy "rfc_6531: ^1.0.0" to clipboard
rfc_6531: ^1.0.0 copied to clipboard

Email address regular expression as close as possible to the specification in RFC 6531.

example/example.dart

import 'package:rfc_6531/rfc_6531.dart' as rfc_6531;

void main() {
  print(rfc_6531.regExp.hasMatch('user@example.com'));
  print(rfc_6531.regExp.hasMatch('not-an-email'));

  final match = rfc_6531.regExp.allMatches('user@example.com').first;
  print(match.namedGroup(rfc_6531.GroupNames.localPart));
  print(match.namedGroup(rfc_6531.GroupNames.domain));
}
1
likes
150
points
21
downloads

Publisher

verified publishermichaeldark.dev

Weekly Downloads

Email address regular expression as close as possible to the specification in RFC 6531.

Repository (GitHub)
View/report issues

Topics

#validation #email #rfc #rfc-6531

Documentation

API reference

License

MIT (license)

More

Packages that depend on rfc_6531