# How to enter "001, 002 ..."

**URL:** <https://forum.getodk.org/t/how-to-enter-001-002/12957>\
**Category:** Support\
**Tags:** form-design\
**Created:** [May 3, 2018, 5:18pm UTC](https://forum.getodk.org/t/how-to-enter-001-002/12957 "2018-05-03T17:18:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Huy\_Tron](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/huy_tron/32/3186_2.png) [@Huy\_Tron](https://forum.getodk.org/u/Huy_Tron)\
**Post date:** [May 3, 2018, 5:18pm UTC](https://forum.getodk.org/t/how-to-enter-001-002/12957/1 "2018-05-03T17:18:03Z")

</div>

Hi everyone,

I have a question to enter the patient code. The patient code consists of 3 digits from 001 to 100. I tried using regex (., '[0-9] [0-9] [0-9]') but not. Please help me find a way to solve this problem.

Thanks,  
Huy.

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [May 3, 2018, 5:27pm UTC](https://forum.getodk.org/t/how-to-enter-001-002/12957/2 "2018-05-03T17:27:57Z")

</div>

Hi @Huy_Tron! I see two problems:

1. If you want to use a regular expression constraint on a number, make sure that the type of your question is `text` and appearance is `numbers`. This is because regular expressions only apply to strings.
2. Don't put spaces. It should be `[0-9][0-9][0-9]`, not `[0-9] [0-9] [0-9]`. Actually, you could reduce the regex to `'[0-9]{3}` and that would also work.

What I mentioned above is described in great detail in our docs at [https://docs.opendatakit.org/form-regex](https://docs.opendatakit.org/form-regex). I'd encourage you to read those docs if you have more regex questions.

Also, when you get a chance, please [introduce yourself here](https://forum.getodk.org/t/-/6671). It helps build community!
