# Regex for numbers

**URL:** <https://forum.getodk.org/t/regex-for-numbers/36754>\
**Category:** Support\
**Tags:** odk-xlsform\
**Created:** [February 16, 2022, 9:51am UTC](https://forum.getodk.org/t/regex-for-numbers/36754 "2022-02-16T09:51:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [February 16, 2022, 12:32pm UTC](https://forum.getodk.org/t/regex-for-numbers/36754/2 "2022-02-16T12:32:06Z")

</div>

Welcome to the ODK forum, @pirakiza! We're glad you're here. When you get a chance, please [introduce yourself on this forum thread](https://forum.getodk.org/t/-/6671). I'd also encourage you to add a picture as your avatar because it helps build community!

Do you want you answer to be limited to 1,2,3,4, or 5? You can use the following:

```plaintext
+---------+------+----------------+-------------+----------------------------+
| type | name | label | constraint | constraint_message |
+---------+------+----------------+-------------+----------------------------+
| integer | q1 | Input a number | .>0 and .<6 | number must be >=1 and <=5 |
+---------+------+----------------+-------------+----------------------------+

```

---

_[View the full topic](https://forum.getodk.org/t/regex-for-numbers/36754)._
