```
yes | clickhouse-local --format LineAsString --structure 'line String' --progress --query "SELECT * FROM table" > /dev/null
```
{
    PeekableReadBufferCheckpoint checkpoint{buf};
    size_t line_size = 0;
    do
    {
        char * pos = find_first_symbols<'\n'>(buf.position(), buf.buffer().end());
        line_size += pos - buf.position();
        buf.position() = pos;
    } while (buf.position() == buf.buffer().end() && !buf.eof());
    buf.makeContinuousMemoryFromCheckpointToPos();
    buf.rollbackToCheckpoint();
    
    size_t line_to_match = line_size;
    if (line_size > 0 && buf.position()[line_size - 1] == '\r')
        --line_to_match;
    bool match = re2_st::RE2::FullMatchN(
        re2_st::StringPiece(buf.position(), line_to_match),
        regexp,
        re2_arguments_ptrs.data(),
        static_cast<int>(re2_arguments_ptrs.size()));
    if (!match && !skip_unmatched)
        throw Exception("Line \"" + std::string(buf.position(), line_to_match) + "\" doesn't match the regexp.", ErrorCodes::INCORRECT_DATA);
    buf.position() += line_size;
    if (!buf.eof() && !checkChar('\n', buf))
        throw Exception("No \\n at the end of line.", ErrorCodes::LOGICAL_ERROR);
    return match;
}
RegexpRowInputFormat::RegexpRowInputFormat(