# Remove Numbers from values in the array using painless scripting

**URL:** https://discuss.elastic.co/t/remove-numbers-from-values-in-the-array-using-painless-scripting/175673
**Category:** Elasticsearch
**Created:** [April 6, 2019, 10:46am UTC](https://discuss.elastic.co/t/remove-numbers-from-values-in-the-array-using-painless-scripting/175673 "2019-04-06T10:46:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Amol\_Gaitonde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amol_gaitonde/32/20893_2.png) [@Amol\_Gaitonde](https://discuss.elastic.co/u/Amol_Gaitonde)
#### Post date: [April 6, 2019, 10:46am UTC](https://discuss.elastic.co/t/remove-numbers-from-values-in-the-array-using-painless-scripting/175673/1 "2019-04-06T10:46:49Z")

</div>

I want the numbers, dots and dashes to be removed from all the elements of an array field using painless scripting and the output should be an array. Can I know how to do it?

Below is the input  
"prod\_names" : [  
"evip-2017.07.30",  
"client-2018.05.13",  
"reporting2017.10.29"  
"xyz"  
],

Expected Output

"prod\_names" : [  
"evip",  
"client",  
"reporting"  
"xyz"  
],

Thanks,  
Amol

---

<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: [May 4, 2019, 10:46am UTC](https://discuss.elastic.co/t/remove-numbers-from-values-in-the-array-using-painless-scripting/175673/2 "2019-05-04T10:46:54Z")

</div>

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