Flutter collection of regex pattern with purpose for string validation.

Getting Started

In your flutter project add the dependency:

  regexpattern: ^0.2.3


Importing package

import 'package:regexpattern/regexpattern.dart';

Using RegexPattern

Matching string to pattern

bool hasMatch = RegexValidation.hasMatch(<String>, <RegexPattern>);


Collection of regex pattern used to validating data

Pattern username;
Pattern email;
Pattern url;
Pattern phone;
Pattern hexadecimal;
Pattern vector;
Pattern image;
Pattern audio;
Pattern video;
Pattern txt;
Pattern doc;
Pattern excel;
Pattern ppt;
Pattern apk;
Pattern pdf;
Pattern html;
Pattern basicDateTime; // Date time in UTC and Iso8601
Pattern binary;
Pattern md5;
Pattern sha1;
Pattern sha256;
Pattern ssn;
Pattern ipv4;
Pattern ipv6;
Pattern isbn;
Pattern github;
Pattern passport;
Pattern currency;
Pattern numericOnly;
Pattern alphabetOnly;
Pattern passwordEasy;
Pattern passwordNormal1;
Pattern passwordNormal2;
Pattern passwordNormal3;
Pattern passwordHard;
Pattern passwordEasyAllowedWhitespace;
Pattern passwordNormal1AllowedWhitespace;
Pattern passwordNormal2AllowedWhitespace;
Pattern passwordNormal3AllowedWhitespace;
Pattern passwordHardAllowedWhitespace;