# How do you remove $ and % signs that precede integer values on Elasticsearch?

**URL:** https://discuss.elastic.co/t/how-do-you-remove-and-signs-that-precede-integer-values-on-elasticsearch/202748
**Category:** Logstash
**Created:** [October 9, 2019, 1:06am UTC](https://discuss.elastic.co/t/how-do-you-remove-and-signs-that-precede-integer-values-on-elasticsearch/202748 "2019-10-09T01:06:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![saomer](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@saomer](https://discuss.elastic.co/u/saomer)
#### Post date: [October 9, 2019, 1:06am UTC](https://discuss.elastic.co/t/how-do-you-remove-and-signs-that-precede-integer-values-on-elasticsearch/202748/1 "2019-10-09T01:06:08Z")

</div>

"price" =\> "$2,190"

thats how it shows on ES!  
I would like to remove the $ on logtash before sending it to ES.

---

<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: [October 9, 2019, 2:19pm UTC](https://discuss.elastic.co/t/how-do-you-remove-and-signs-that-precede-integer-values-on-elasticsearch/202748/2 "2019-10-09T14:19:13Z")

</div>

You could use the gsub function of a mutate filter.

---

<div class="post-metadata">

### Author: ![saomer](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@saomer](https://discuss.elastic.co/u/saomer)
#### Post date: [October 9, 2019, 5:38pm UTC](https://discuss.elastic.co/t/how-do-you-remove-and-signs-that-precede-integer-values-on-elasticsearch/202748/3 "2019-10-09T17:38:54Z")

</div>

thanks Badger, can you give an example of the syntax?

---

<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: [October 9, 2019, 5:47pm UTC](https://discuss.elastic.co/t/how-do-you-remove-and-signs-that-precede-integer-values-on-elasticsearch/202748/4 "2019-10-09T17:47:38Z")

</div>

```
mutate { gsub => ["message", "\$", ""] }

```

Note that you have to escape the $ because otherwise it would anchor the pattern to end of string.

---

<div class="post-metadata">

### Author: ![saomer](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@saomer](https://discuss.elastic.co/u/saomer)
#### Post date: [October 9, 2019, 6:00pm UTC](https://discuss.elastic.co/t/how-do-you-remove-and-signs-that-precede-integer-values-on-elasticsearch/202748/5 "2019-10-09T18:00:33Z")

</div>

Thanks a lot, this worked for me 😀

---

<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 6, 2019, 6:07pm UTC](https://discuss.elastic.co/t/how-do-you-remove-and-signs-that-precede-integer-values-on-elasticsearch/202748/6 "2019-11-06T18:07:33Z")

</div>

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