# exception=\>#\<CSV::MalformedCSVError: Illegal quoting in line 1.\>

**URL:** <https://discuss.elastic.co/t/exception-csv-illegal-quoting-in-line-1/291437>\
**Category:** Logstash\
**Created:** [December 10, 2021, 3:05pm UTC](https://discuss.elastic.co/t/exception-csv-illegal-quoting-in-line-1/291437 "2021-12-10T15:05:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 10, 2021, 4:59pm UTC](https://discuss.elastic.co/t/exception-csv-illegal-quoting-in-line-1/291437/2 "2021-12-10T16:59:34Z")

</div>

> [@stillfreem](#):
>
> Any help would be much appreciated

You data does not match either regexp. It is not words separated by colons, and it is not words separated by equals signs, so it goes through the csv filter. csv fields have to be quoted correctly. The field must start and end with " (if quotes are present at all) and any quotes within the field must be escaped with a second double quote. So something like `foo,"a""b""c",bar` would be a valid 3 field csv.

You need another branch to your if-else and another filter to parse that data.

---

_[View the full topic](https://discuss.elastic.co/t/exception-csv-illegal-quoting-in-line-1/291437)._
