# How to replace special characters to another character

**URL:** <https://discuss.elastic.co/t/how-to-replace-special-characters-to-another-character/111232>\
**Category:** Logstash\
**Created:** [December 12, 2017, 5:25am UTC](https://discuss.elastic.co/t/how-to-replace-special-characters-to-another-character/111232 "2017-12-12T05:25:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shekhar\_Pandey](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shekhar\_Pandey](https://discuss.elastic.co/u/Shekhar_Pandey)\
**Post date:** [December 12, 2017, 5:25am UTC](https://discuss.elastic.co/t/how-to-replace-special-characters-to-another-character/111232/1 "2017-12-12T05:25:33Z")

</div>

Hello!  
I want to replace below string  
hello\>\>\>\>hiii\>huha special characters to , and I achieve by the following way..

filter{  
mutate {  
gsub =\> [  
"title", "[\>/]", ","  
]  
}  
}

It works but it replace every single special characters to , like this  
hello,,,,hiii,huha.....  
but I want hello,hiii,huha..

Any solution...

---

<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:** [December 12, 2017, 6:59am UTC](https://discuss.elastic.co/t/how-to-replace-special-characters-to-another-character/111232/2 "2017-12-12T06:59:17Z")

</div>

Using `[>/]+` instead of `[>/]` should fix that.

---

<div class="post-metadata">

**Author:** ![Shekhar\_Pandey](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shekhar\_Pandey](https://discuss.elastic.co/u/Shekhar_Pandey)\
**Post date:** [December 12, 2017, 7:09am UTC](https://discuss.elastic.co/t/how-to-replace-special-characters-to-another-character/111232/3 "2017-12-12T07:09:34Z")

</div>

Thanks Sir. Its work.

---

<div class="post-metadata">

**Author:** ![elizabethdavid](https://avatars.discourse-cdn.com/v4/letter/e/7ba0ec/32.png) [@elizabethdavid](https://discuss.elastic.co/u/elizabethdavid)\
**Post date:** [January 4, 2018, 7:20am UTC](https://discuss.elastic.co/t/how-to-replace-special-characters-to-another-character/111232/4 "2018-01-04T07:20:11Z")

</div>

The other character you give the information that will replace the special character is hard for the student to replace it correctly. Your tutorial will help them or they can [Buy Custom Papers](http://www.mypaperwriter.co.uk/buy-research-paper/) more information about the file.

---

<div class="post-metadata">

**Author:** ![Shekhar\_Pandey](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shekhar\_Pandey](https://discuss.elastic.co/u/Shekhar_Pandey)\
**Post date:** [January 4, 2018, 7:35am UTC](https://discuss.elastic.co/t/how-to-replace-special-characters-to-another-character/111232/5 "2018-01-04T07:35:21Z")

</div>

Is there any elastic search product comparison paper is available.

---

<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 1, 2018, 7:35am UTC](https://discuss.elastic.co/t/how-to-replace-special-characters-to-another-character/111232/6 "2018-02-01T07:35:27Z")

</div>

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