# Search for a string within a specific field

**URL:** <https://discuss.elastic.co/t/search-for-a-string-within-a-specific-field/118681>\
**Category:** Kibana\
**Created:** [February 6, 2018, 4:16pm UTC](https://discuss.elastic.co/t/search-for-a-string-within-a-specific-field/118681 "2018-02-06T16:16:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghouston10](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@ghouston10](https://discuss.elastic.co/u/ghouston10)\
**Post date:** [February 6, 2018, 4:16pm UTC](https://discuss.elastic.co/t/search-for-a-string-within-a-specific-field/118681/1 "2018-02-06T16:16:49Z")

</div>

Hi,

In dev tools, how do I search for documents in the 'example' index where the 'test' field contains the string 'abc'. The field will consist of other characters but must contain 'abc'.

Thanks

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [February 7, 2018, 7:42pm UTC](https://discuss.elastic.co/t/search-for-a-string-within-a-specific-field/118681/2 "2018-02-07T19:42:21Z")

</div>

hi @ghouston10,

seems similar to this question: [Search for a substring within a specific field](https://discuss.elastic.co/t/search-for-a-substring-within-a-specific-field/118841)

you can use the lucene syntax here.

> GET /example/\_search?q=test:abc\*

For more advanced matching, you can look at the `regexp` matcher. See here for details: [wildcard and regexp Queries | Elasticsearch: The Definitive Guide [2.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/guide/current/_wildcard_and_regexp_queries.html)

---

<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:** [March 7, 2018, 7:42pm UTC](https://discuss.elastic.co/t/search-for-a-string-within-a-specific-field/118681/3 "2018-03-07T19:42:38Z")

</div>

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