TextParser constructor
TextParser({})
Creates a TextParser that parses text according to specified matchers.
matchers
is a list of TextMatchers to be used for parsing. If it
is omitted, the three preset matchers (UrlMatcher
, EmailMatcher
and TelMatcher
) are used.
If multiLine
is enabled, then ^
and $
will match the beginning
and end of a line, in addition to matching beginning and end of
input, respectively.
If caseSensitive
is disabled, then case is ignored.
If unicode
is enabled, then the pattern is treated as a Unicode
pattern as described by the ECMAScript standard.
If dotAll
is enabled, then the .
pattern will match all
characters, including line terminators.
Implementation
TextParser({
List<TextMatcher> matchers = _kDefaultMatchers,
bool multiLine = false,
bool caseSensitive = true,
bool unicode = false,
bool dotAll = false,
}) {
_parser = Parser(
matchers: matchers,
multiLine: multiLine,
caseSensitive: caseSensitive,
unicode: unicode,
dotAll: dotAll,
);
}