# Replacing escape characters

**URL:** <https://discuss.elastic.co/t/replacing-escape-characters/105294>\
**Category:** Logstash\
**Created:** [October 25, 2017, 8:35pm UTC](https://discuss.elastic.co/t/replacing-escape-characters/105294 "2017-10-25T20:35:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GambitK](https://avatars.discourse-cdn.com/v4/letter/g/47e85d/32.png) [@GambitK](https://discuss.elastic.co/u/GambitK)\
**Post date:** [October 25, 2017, 8:35pm UTC](https://discuss.elastic.co/t/replacing-escape-characters/105294/1 "2017-10-25T20:35:35Z")

</div>

Hello, I'm trying to replace escape characters. I have log lines where the source is escaping all '' and also '"', so it becomes '\' and '"' when it comes to logstash.  
I've tried gsub =\> ["message", "\"","""], gsub =\> ['message','"\"','"'] and can't get it to work, anyone has had any experience with this?

---

<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:** [November 22, 2017, 8:35pm UTC](https://discuss.elastic.co/t/replacing-escape-characters/105294/2 "2017-11-22T20:35:59Z")

</div>

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