line_pattern_matcher 1.1.0 copy "line_pattern_matcher: ^1.1.0" to clipboard
line_pattern_matcher: ^1.1.0 copied to clipboard

A flexible Dart package for matching complex patterns across multiple lines of text. Ideal for log analysis, text processing, and pattern recognition tasks.

example/example.dart

import 'package:line_pattern_matcher/line_pattern_matcher.dart';

void main() {
  final matcher = LinePatternMatcher([
    PatternConfig(
        type: 'firstLine',
        keywords: [
          ['Hello'],
          ['Hi']
        ],
        logic: LogicType.or),
    PatternConfig(type: 'lastLine', keywords: [
      ['Goodbye']
    ])
  ]);

  final lines = ['Hello, World!', 'This is a test.', 'Goodbye!'];

  if (matcher.match(lines)) {
    print('Pattern matched!');
  } else {
    print('Pattern not matched.');
  }
}
0
likes
160
points
45
downloads

Publisher

verified publisherchangyy.app

Weekly Downloads

A flexible Dart package for matching complex patterns across multiple lines of text. Ideal for log analysis, text processing, and pattern recognition tasks.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on line_pattern_matcher