# Logstash problem with \\

**URL:** <https://discuss.elastic.co/t/logstash-problem-with/276775>\
**Category:** Logstash\
**Created:** [June 23, 2021, 10:50am UTC](https://discuss.elastic.co/t/logstash-problem-with/276775 "2021-06-23T10:50:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Betorov](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@Betorov](https://discuss.elastic.co/u/Betorov)\
**Post date:** [June 23, 2021, 10:50am UTC](https://discuss.elastic.co/t/logstash-problem-with/276775/1 "2021-06-23T10:50:22Z")

</div>

Hi every one,  
I want to put the values inside a path in some field. I want to split the path so i can take every value inside it but i can't split with \ because is a special character.

I tried to replace \ with / but it didn't work

```auto
gsub => ["path","[\\]","/"]

```

When I use rubydebug the path looks like this:

C:\Users\U1\Desktop\a\ec.txt

But when I go to see the data in kibana it looks like this:

C:\Users\U1\Desktop\a\ec.txt

There is a way to take the value inside the path (I don't like to use Grok filter because I have to analize a path (more complicated then the exemple before) where the position of value is fondamental. I can't specify the position with the Grok filter exept only patterns, rigth?)  
Thanks in advance

---

<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:** [June 23, 2021, 4:42pm UTC](https://discuss.elastic.co/t/logstash-problem-with/276775/2 "2021-06-23T16:42:52Z")

</div>

> [@Betorov](#):
>
> C:\Users\U1\Desktop\a\ec.txt
> 
> But when I go to see the data in kibana it looks like this:
> 
> C:\Users\U1\Desktop\a\ec.txt

What is the difference between those two?

---

<div class="post-metadata">

**Author:** ![Betorov](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@Betorov](https://discuss.elastic.co/u/Betorov)\
**Post date:** [June 24, 2021, 6:47am UTC](https://discuss.elastic.co/t/logstash-problem-with/276775/3 "2021-06-24T06:47:38Z")

</div>

Sorry, the first one have duble \\ while the second one only .  
I solved (the problem was that the path value was in a nasted field)

---

<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:** [July 22, 2021, 6:48am UTC](https://discuss.elastic.co/t/logstash-problem-with/276775/4 "2021-07-22T06:48:35Z")

</div>

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