Have you tried this:
In the survey tab of your xlsform:
It should solve your issue (i.e. users are only allowed to enter 3 digits from 001 to 999).
Reference xlsform:
Regex_Constraint.xlsx (10.0 KB)
If you are still facing an issue, please share with us a screenshot of the issue. The community would love to help you solve your issue.
Note: if you wish to have the numbers between 000 to 999
you could simply change the regex code to (regex(., '^[001-999]{3}$') and (. >= 000))