# Remove a field that starts with an integer

**URL:** https://discuss.elastic.co/t/remove-a-field-that-starts-with-an-integer/26370
**Category:** Logstash
**Created:** [July 27, 2015, 9:43pm UTC](https://discuss.elastic.co/t/remove-a-field-that-starts-with-an-integer/26370 "2015-07-27T21:43:56Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![Gabriel\_Rosca](https://avatars.discourse-cdn.com/v4/letter/g/e19adc/32.png) [@Gabriel\_Rosca](https://discuss.elastic.co/u/Gabriel_Rosca)
#### Post date: [July 28, 2015, 8:31pm UTC](https://discuss.elastic.co/t/remove-a-field-that-starts-with-an-integer/26370/11 "2015-07-28T20:31:33Z")

</div>

I got it to work by using ruby filter

```
   ruby {
    code => "
    event.to_hash.keys.each { |k|
    if k.start_with?('1.')
      event.remove(k)
    end
    }
   "
   }
```

---

_[View the full topic](https://discuss.elastic.co/t/remove-a-field-that-starts-with-an-integer/26370)._
