valid_regexps

Group: errors

Maturity: stable

Linter v0.1.22

Since info is static, may be stale
corerecommendedflutterpedantic

View all Lint Rules

Using the Linter

DO use valid regular expression syntax when creating regular expression instances.

Regular expressions created with invalid syntax will throw a FormatException at runtime so should be avoided.

BAD:

print(RegExp(r'(').hasMatch('foo()'));

GOOD:

print(RegExp(r'\(').hasMatch('foo()'));