# Dissect filter special character "\\" "\<"

**URL:** https://discuss.elastic.co/t/dissect-filter-special-character/163571
**Category:** Logstash
**Created:** [January 9, 2019, 3:46pm UTC](https://discuss.elastic.co/t/dissect-filter-special-character/163571 "2019-01-09T15:46:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Necus](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@Necus](https://discuss.elastic.co/u/Necus)
#### Post date: [January 9, 2019, 3:46pm UTC](https://discuss.elastic.co/t/dissect-filter-special-character/163571/1 "2019-01-09T15:46:19Z")

</div>

Hi,  
I'm trying to use the best of dissect, unfortunately i have encounter small problem with special characters like "" or "\<"  
For example:  
\<14\>Jan 9 15:36:03  
and  
domain\_name\username  
When i'm parsing this log with fields, i wan't to exclude "\<14" and "domain\_name\" in the example above.  
Do you have any idea how to do this?

---

<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: [January 9, 2019, 4:48pm UTC](https://discuss.elastic.co/t/dissect-filter-special-character/163571/2 "2019-01-09T16:48:05Z")

</div>

As far as dissect is concerned, the only special characters are %{ and }. So if you have a string such as

```
<14>Jan 9 15:36:03 and domain_name\username and so on

```

You can dissect it using

```
dissect { mapping => { "message" => "<%{a}>%{ts} %{+ts} %{+ts} and %{d}\%{u} %{}" } }
```

---

<div class="post-metadata">

### Author: ![Necus](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@Necus](https://discuss.elastic.co/u/Necus)
#### Post date: [January 9, 2019, 6:36pm UTC](https://discuss.elastic.co/t/dissect-filter-special-character/163571/3 "2019-01-09T18:36:22Z")

</div>

Thank you that obviously works 🙂

But that creates new question, how to change this parser if there is no domain and username field, its empty, now I have \_dissectfailure tag ☹  
I believe its because of the "" character

---

<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: [January 9, 2019, 7:35pm UTC](https://discuss.elastic.co/t/dissect-filter-special-character/163571/4 "2019-01-09T19:35:32Z")

</div>

As the [documentation](https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html#_conditional_processing) says, you might need to test the format of the string is appropriate for the dissection before dissecting.

---

<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: [February 6, 2019, 7:35pm UTC](https://discuss.elastic.co/t/dissect-filter-special-character/163571/5 "2019-02-06T19:35:41Z")

</div>

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