# CSV Input - Some fields are multiline - LR vs CRLF

**URL:** <https://discuss.elastic.co/t/csv-input-some-fields-are-multiline-lr-vs-crlf/273691>\
**Category:** Logstash\
**Created:** [May 21, 2021, 7:28pm UTC](https://discuss.elastic.co/t/csv-input-some-fields-are-multiline-lr-vs-crlf/273691 "2021-05-21T19:28:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![uklipse](https://avatars.discourse-cdn.com/v4/letter/u/cdc98d/32.png) [@uklipse](https://discuss.elastic.co/u/uklipse)\
**Post date:** [May 21, 2021, 7:28pm UTC](https://discuss.elastic.co/t/csv-input-some-fields-are-multiline-lr-vs-crlf/273691/1 "2021-05-21T19:28:29Z")

</div>

I am trying input a csv file that certain fields can be multiline. When I paste the sample data into Notepad++ and display end of line characters, I can see the actual csv line separates using CRLF but the new lines within a field use LF. I want all lines within one field to be one value in Elastic. Below is my input code. Any suggestions on how to input this properly?

```
input{
  file {
    path => "/home/ubuntu/csv_inputs/sca/*.csv"
    start_position => "beginning"
    sincedb_path => "/dev/null"

    codec => multiline {
      pattern => "\lf"
      negate => true
      what => previous
    }

  }
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 18, 2021, 7:29pm UTC](https://discuss.elastic.co/t/csv-input-some-fields-are-multiline-lr-vs-crlf/273691/2 "2021-06-18T19:29:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
