# Get specific value out og message-field

**URL:** <https://discuss.elastic.co/t/get-specific-value-out-og-message-field/180944>\
**Category:** Kibana\
**Created:** [May 14, 2019, 7:47am UTC](https://discuss.elastic.co/t/get-specific-value-out-og-message-field/180944 "2019-05-14T07:47:38Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [May 14, 2019, 10:44am UTC](https://discuss.elastic.co/t/get-specific-value-out-og-message-field/180944/4 "2019-05-14T10:44:16Z")

</div>

> When @ the linked post is written "lastSlashIndex" and "LastUndrIndex", are that funktions of painless? I did not find anything.

These are just arbitrary variable names that you can define in your script. Painless function is `lastIndexOf`. I'd recommend you first go through [examples](https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-examples.html), [other discuss threads](https://discuss.elastic.co/t/scripted-field-getting-first-index-of-a-substring/81418) and [API reference](https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-api-reference.html). Experiment with them and get back if you still have questions.

As far as I know Regexes are disabled by default in Painless, but you can use other string-based functions.

--  
Oleg

---

_[View the full topic](https://discuss.elastic.co/t/get-specific-value-out-og-message-field/180944)._
