regex_range library

Functions

charRange(String min, String max, {bool caseSensitive = false, bool exact = false}) RegExp
Generates a character range.
numberRange(int min, int max, {bool exact = false}) RegExp
Generates a number range.
range<T>(T min, T max, {bool exact = false}) RegExp
To generate a regex, you may use the range function to generate both number and character ranges, depending on what's passed in. A number range is generated when passing in 2 numbers, and a character range is generated when passing in 2 strings with a length of 1.