RegexChar enum

Common character groups for RegexModel.allowOnly, RegexModel.notAllowed and the allowList of the "only" rules. Pick them instead of writing regex.

Inheritance
Available extensions

Values

letters → const RegexChar

Letters of any language (a, ş, ä, é, …).

const RegexChar(r'\p{L}', 'letters')
englishLetters → const RegexChar

English letters a–z and A–Z only.

const RegexChar('a-zA-Z', 'English letters')
uppercase → const RegexChar

Uppercase letters of any language.

const RegexChar(r'\p{Lu}', 'uppercase letters')
lowercase → const RegexChar

Lowercase letters of any language.

const RegexChar(r'\p{Ll}', 'lowercase letters')
digits → const RegexChar

Digits 0–9.

const RegexChar('0-9', 'numbers')
whitespace → const RegexChar

Spaces, tabs and line breaks.

const RegexChar(r'\s', 'spaces')
underscore → const RegexChar

_

const RegexChar('_', '_')
dash → const RegexChar

-

const RegexChar(r'\-', '-')
dot → const RegexChar

.

const RegexChar(r'\.', '.')
at → const RegexChar

@

const RegexChar('@', '@')
plus → const RegexChar

+

const RegexChar(r'\+', '+')
comma → const RegexChar

,

const RegexChar(',', ',')
apostrophe → const RegexChar

'

const RegexChar("'", "'")
slash → const RegexChar

/

const RegexChar(r'\/', '/')
special → const RegexChar

Anything that is not a letter, digit or space (!, #, €, …).

const RegexChar(r'^\p{L}\p{N}\s', 'special characters')

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
label → String
Word used in automatic rule titles.
final
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
pattern → String
Character class body; special is a negated class and is handled apart.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<RegexChar>
A constant List of the values in this enum, in order of their declaration.