endOfLine method

FluentRegex endOfLine(
  1. [bool enable = true]
)

Mark the expression to end at the last character of the line

Enable or disable the expression to end at the last character of the line using enable flag

Example: var regex = FluentRegex() .literal('abc') .endOfLine(); expect(regex.hasMatch('abc12'), false); expect(regex.hasMatch('12abc'), true);

Implementation

FluentRegex endOfLine([bool enable = true]) =>
    FluentRegex._copyWith(this, endOfLine: enable);