```
clickhouse-local \
    --format_regexp_escaping_rule 'Raw' \
    --format_regexp_skip_unmatched 1 \
    --format_regexp '^([^ \.]+)(\.[^ ]+)? +([^ ]+) +(\d+) +(\d+)$' \
    --query "
SELECT replaceRegexpOne(_path, '^.+pageviews-(\\d{4})(\\d{2})(\\d{2})-(\\d{2})(\\d{2})(\\d{2}).gz$', '\1-\2-\3 \4-\5-\6')::DateTime AS time, * 
FROM file('pageviews*.gz', Regexp, 'project String, subproject String, path String, hits UInt64, size UInt64')"
```

```
Code: 117. DB::Exception: No \n after \r at the end of line.: (at row 148660)
: While executing ParallelParsingBlockInputFormat: While executing File. (INCORRECT_DATA)
```

```
clickhouse-local \
    --format_regexp_escaping_rule 'Raw' \
    --format_regexp_skip_unmatched 1 \
    --format_regexp '^([^ \.]+)(\.[^ ]+)? +([^ ]+) +(\d+) +(\d+).*?$' \
    --query "
SELECT replaceRegexpOne(_path, '^.+pageviews-(\\d{4})(\\d{2})(\\d{2})-(\\d{2})(\\d{2})(\\d{2}).gz$', '\1-\2-\3 \4-\5-\6')::DateTime AS time, * 
FROM file('pageviews*.gz', Regexp, 'project String, subproject String, path String, hits UInt64, size UInt64')"
```

```
Code: 117. DB::Exception: No \n after \r at the end of line.: (at row 148660)
: While executing ParallelParsingBlockInputFormat: While executing File. (INCORRECT_DATA)
```
class RegexpFieldExtractor
{
public:
    RegexpFieldExtractor(const FormatSettings & format_settings);
    
    bool parseRow(PeekableReadBuffer & buf);
    re2_st::StringPiece getField(size_t index) { return matched_fields[index]; }
    size_t getMatchedFieldsSize() const { return matched_fields.size(); }
    size_t getNumberOfGroups() const { return regexp.NumberOfCapturingGroups(); }
private:
    const re2_st::RE2 regexp;
    
    std::vector<re2_st::StringPiece> matched_fields;
    
    std::vector<re2_st::RE2::Arg> re2_arguments;
    std::vector<re2_st::RE2::Arg *> re2_arguments_ptrs;
    bool skip_unmatched;
};
class RegexpRowInputFormat : public IRowInputFormat
{
public:
    RegexpRowInputFormat(ReadBuffer & in_, const Block & header_, Params params_, const FormatSettings & format_settings_);
    String getName() const override { return "RegexpRowInputFormat"; }