addLineBreaks method

CharacterSet addLineBreaks()

See SpecialCharacter.carriageReturn and SpecialCharacter.lineFeed Example: expect(regex.findFirst('hello\rworld'), '\r'); expect(regex.findFirst('hello\nworld'), '\n'); expect(regex.findFirst('hello\r\nworld'), '\r\n'); expect(regex.findFirst('hello\r\rworld'), '\r\r'); expect(regex.hasMatch('hello world'), false);

Implementation

CharacterSet addLineBreaks() {
  _sets.add(SpecialCharacter.carriageReturn);
  _sets.add(SpecialCharacter.lineFeed);
  return this;
}