Gets whether or not the current line matches the given pattern.
bool matches(RegExp regex) { if (isDone) { return false; } return regex.firstMatch(current) != null; }