# How to send \\n(newline chara) in XMPP/Jabbar output filter?

**URL:** <https://discuss.elastic.co/t/how-to-send-n-newline-chara-in-xmpp-jabbar-output-filter/63721>\
**Category:** Logstash\
**Created:** [October 24, 2016, 9:07am UTC](https://discuss.elastic.co/t/how-to-send-n-newline-chara-in-xmpp-jabbar-output-filter/63721 "2016-10-24T09:07:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lshekhar](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@lshekhar](https://discuss.elastic.co/u/lshekhar)\
**Post date:** [October 24, 2016, 9:07am UTC](https://discuss.elastic.co/t/how-to-send-n-newline-chara-in-xmpp-jabbar-output-filter/63721/1 "2016-10-24T09:07:10Z")

</div>

Wanted to split message with multiple line. I am inserting \n(also tried with \r, \r\n nothing helped) , but it is taken as normal string. Where can I get info on how to send special character as it is?

RequestId: 222222 \r Total: 1  
2:26 PM  
RequestId: 222222 \r\n Total: 4  
2:29

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 26, 2016, 5:38pm UTC](https://discuss.elastic.co/t/how-to-send-n-newline-chara-in-xmpp-jabbar-output-filter/63721/2 "2016-10-26T17:38:38Z")

</div>

Escape sequences in Logstash strings don't work very well. I think you'll have to use a ruby filter to build the string. You can e.g. use `10.chr` to obtain a newline character without using a backslash.

---

<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 6, 2017, 4:32am UTC](https://discuss.elastic.co/t/how-to-send-n-newline-chara-in-xmpp-jabbar-output-filter/63721/3 "2017-07-06T04:32:34Z")

</div>


