# %{POSINT} doesn't match 0 (zero)

**URL:** <https://discuss.elastic.co/t/posint-doesnt-match-0-zero/176733>\
**Category:** Logstash\
**Created:** [April 13, 2019, 11:22am UTC](https://discuss.elastic.co/t/posint-doesnt-match-0-zero/176733 "2019-04-13T11:22:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticSmash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticsmash/32/45608_2.png) [@elasticSmash](https://discuss.elastic.co/u/elasticSmash)\
**Post date:** [April 13, 2019, 11:22am UTC](https://discuss.elastic.co/t/posint-doesnt-match-0-zero/176733/1 "2019-04-13T11:22:05Z")

</div>

I spent about 15 minutes trying to figure out why my match pattern didn't match only to realize that the core pattern %{POSINT} doesn't match 0. This was a bit unexpected and I can already hear the arguments as to why it would have been setup this way, but coming from programming, I guess I think of POSINT more as unsigned number, which 0 counts as an unsigned number. But in mathematical terms, zero usually doesn't count as a positive integer.

So did the logstash developers follow some standard for this?

---

<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 11, 2019, 11:22am UTC](https://discuss.elastic.co/t/posint-doesnt-match-0-zero/176733/2 "2019-05-11T11:22:10Z")

</div>

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