iregexp
0.2.1, released 6 weeks ago by karapetov.com
Dart implementation of RFC 9485 I-Regexp, validating and matching patterns.
What it does
It parses I-Regexp patterns, validates them, and uses Dart's RegExp for matching. It provides shortcuts for full-string and substring matches.
AI-written summary of version 0.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to validate I-Regexp patterns before use
- You want a lightweight regex implementation that follows RFC 9485
- You need to match patterns in a Dart-only environment
Skip it when
- You need advanced regex features not covered by RFC 9485
- You require a full-featured regex engine with lookbehind or other non-I-Regexp constructs
Strengths
- Validates patterns against RFC 9485
- Simple API with matches() and matchesSubstring()
- No external code generation or build steps
Weaknesses
- Limited to RFC 9485 syntax
- No support for advanced regex features
- Relies on Dart's RegExp for actual matching
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:iregexp/iregexp.dart';
void main(){
final iRegexp = IRegexp('[0-9]+.[0-9]+.[0-9]+');
print(iRegexp.matches('1.2.3')); // true
print(iRegexp.matches('foo')); // false
}Alternatives
Packages that do the same job and could replace iregexp.
- validators2
String validation and sanitization for Dart.
83Compare - any_date
Parse strings in any format or language into DateTime objects, respecting ISO and RFC standards.
57Compare - string_to_color
Convert strings to colors, hex strings, or hex integers in Dart and Flutter.
42Compare - fuzzywuzzy
A Dart port of FuzzyWuzzy for fuzzy string matching and searching using Levenshtein distance.
50Compare
Works with
Packages commonly used together with iregexp: ones it builds on, ones built on it, and its own family.