notWord static method

Pattern notWord([
  1. int? min,
  2. int? max
])

Matches any non-word character

Implementation

static Pattern notWord([int? min, int? max]) {
  final node = nodes.CharacterClass(
    negated: false,
    members: [nodes.Escape('not-word')],
  );
  final pattern = Pattern._(node);
  return (min != null) ? pattern.repeat(min, max) : pattern;
}