# How do perform string manipulations

**URL:** <https://discuss.elastic.co/t/how-do-perform-string-manipulations/32706>\
**Category:** Logstash\
**Created:** [October 21, 2015, 5:34pm UTC](https://discuss.elastic.co/t/how-do-perform-string-manipulations/32706 "2015-10-21T17:34:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 21, 2015, 6:21pm UTC](https://discuss.elastic.co/t/how-do-perform-string-manipulations/32706/2 "2015-10-21T18:21:48Z")

</div>

Wouldn't substr(destinationid,instr(destinationid,"discard"),7) always return "discard"? Perhaps you can give an example of an input string and the desired result.

---

_[View the full topic](https://discuss.elastic.co/t/how-do-perform-string-manipulations/32706)._
