# Quering for a value between two strings

**URL:** <https://discuss.elastic.co/t/quering-for-a-value-between-two-strings/144558>\
**Category:** Kibana\
**Created:** [August 15, 2018, 5:48pm UTC](https://discuss.elastic.co/t/quering-for-a-value-between-two-strings/144558 "2018-08-15T17:48:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Merlin\_Nunez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/merlin_nunez/32/58551_2.png) [@Merlin\_Nunez](https://discuss.elastic.co/u/Merlin_Nunez)\
**Post date:** [August 15, 2018, 5:48pm UTC](https://discuss.elastic.co/t/quering-for-a-value-between-two-strings/144558/1 "2018-08-15T17:48:09Z")

</div>

Hey All,  
Sorry if this has been asked befower, I don´t know how to search for it.  
But basically I want to match events based on a value in between two tags:

> ```
> response: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <TransactionResponse>
> <Result>
> <ResponseCode>1030</ResponseCode>
> <ResponseMessage>Invalid token</ResponseMessage>
> <ResponseTimestamp>15082018170001</ResponseTimestamp>
> <MerchantID>AUP006DM006</MerchantID>
> 
> ```

I need to be able to target any events that contains:

> `<ResponseCode>1030</ResponseCode>`

With any number except from 1000.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 15, 2018, 6:29pm UTC](https://discuss.elastic.co/t/quering-for-a-value-between-two-strings/144558/2 "2018-08-15T18:29:44Z")

</div>

Best way would be to parse the data in the document into separate fields before indexing them into Elasticsearch.

---

<div class="post-metadata">

**Author:** ![Merlin\_Nunez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/merlin_nunez/32/58551_2.png) [@Merlin\_Nunez](https://discuss.elastic.co/u/Merlin_Nunez)\
**Post date:** [August 15, 2018, 6:37pm UTC](https://discuss.elastic.co/t/quering-for-a-value-between-two-strings/144558/3 "2018-08-15T18:37:43Z")

</div>

I know, but at them moment I don´t have the time to mess with the grok filter and all the testing that requires.  
We handle a high volume incoming data, and a change in performance could be catastrophic.  
Is there a way to do it in kibana for now?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 15, 2018, 7:29pm UTC](https://discuss.elastic.co/t/quering-for-a-value-between-two-strings/144558/4 "2018-08-15T19:29:25Z")

</div>

I can’t think of any way right now.

---

<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:** [September 12, 2018, 7:29pm UTC](https://discuss.elastic.co/t/quering-for-a-value-between-two-strings/144558/5 "2018-09-12T19:29:26Z")

</div>

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