# Search on a field with regex

**URL:** https://discuss.elastic.co/t/search-on-a-field-with-regex/52056
**Category:** Kibana
**Created:** [June 7, 2016, 11:06am UTC](https://discuss.elastic.co/t/search-on-a-field-with-regex/52056 "2016-06-07T11:06:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ivanandrianto95](https://avatars.discourse-cdn.com/v4/letter/i/48db29/32.png) [@ivanandrianto95](https://discuss.elastic.co/u/ivanandrianto95)
#### Post date: [June 7, 2016, 11:06am UTC](https://discuss.elastic.co/t/search-on-a-field-with-regex/52056/1 "2016-06-07T11:06:37Z")

</div>

In Kibana, I need to match string on a field 'url' that contains, for example '/new-product/p1' or '/new-product/sample' but not '/new-product/?type=1' or '/new-product/' only. How can do it?

---

<div class="post-metadata">

### Author: ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)
#### Post date: [June 7, 2016, 8:24pm UTC](https://discuss.elastic.co/t/search-on-a-field-with-regex/52056/2 "2016-06-07T20:24:41Z")

</div>

Try `url:/.*\/new-product\/[^?]+/`. Note: regex search will be slow!

---

<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: [July 6, 2017, 1:51pm UTC](https://discuss.elastic.co/t/search-on-a-field-with-regex/52056/3 "2017-07-06T13:51:18Z")

</div>


