VerbalExpression class

Represents a VerbalExpression

Constructors

VerbalExpression()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String expression) → void
Append literal expression
addModifier(String modifier) → void
Adds modifier flag
any(String value) → void
Shorthand for this.anyOf()
anyOf(String value) → void
Adds expression that any character from value
anything([bool isLazy = false]) → void
Adds expression that matches anything (includes empty string)
anythingBut(String value, [bool isLazy = false]) → void
Adds expression that matches anything, but not value
atLeast(int min) → void
Produce range count with only minimal number of occurrences
beginCapture() → void
Starts a capturing group
br() → void
Shortcut for this.lineBreak()
count(int? count) → void
Add count of previous group
countRange(int min, int max) → void
Add count of previous group
digit() → void
Adds digit, same as 0-9
endCapture() → void
Ends a capturing group
endOfLine([bool enable = true]) → void
Mark the expression to end at the last character of the line
find(String value) → void
Adds a string to the expression
hasMatch(String value) bool
Shorthand function for the Regex.hasMatch function
lineBreak() → void
Adds universal (Unix + Windows CRLF + Macintosh) line break expression
maybe(String value) → void
Adds a string to the expression that might appear once (or not)
multiple(String value, {int? min, int? max}) → void
Convenient method to show that string usage count is exact count, range count or simply one or more
nonDigit() → void
Adds non-digit, same as ^0-9
nonSpace() → void
Adds non-whitespace character, same as ^\s
nonWordChar() → void
Adds non-word character, same as ^\w
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
oneOrMore() → void
Adds '+' char to regexp, means one or more times repeated
or(String value) → void
Add a alternative expression to be matched
range(List<Range> ranges) → void
Add expression to match a range (or multiply ranges)
removeModifier(String modifier) → void
Removes modifier flag
replace(String source, String value) String
Shorthand function for the String.replace functions
sanitize(String value) String
Escapes any non-word char with two backslashes used by any method, except this.add
searchOneLine([bool enable = true]) → void
Enable or disable search in one line in prior to multi line search according to enable flag.
something() → void
Adds expression that matches something that might appear once (or more)
somethingBut(String value) → void
Adds expression that matches something that might appear once (or more), but not value
space() → void
Adds whitespace character, same as \t\n\x0B\f\r
startOfLine([bool enable = true]) → void
Mark the expression to start at the beginning of the line
stopAtFirst([bool enable = true]) → void
Enable or disable search only for a first match in prior to all matches according to enable flag.
tab() → void
Adds expression to match a tab character ('\u0009')
then(String value) → void
Adds a string to the expression
toRegExp() RegExp
Convert to RegExp
toString() String
Overrides toString
override
withAnyCase([bool enable = true]) → void
Enable or disable matching with ignoring case according to enable flag.
word() → void
Adds word, same as a-zA-Z_0-9+
wordChar() → void
Adds word character, same as a-zA-Z_0-9
zeroOrMore([bool isLazy = false]) → void
Adds zero or more times repeater.

Operators

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