How to limit an entry from 1 to 100 excluding 9, 21 and 97?

I want to enter 1-100 except “9”, “21”, and “97” digit
These 3 digits (9,21,97) never entered the form.
What will be the code?

You could do it as outlined in the image shared below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: when a condition is not met

Data entry screen as seen in Enketo: when a condition is not met

Data entry screen as seen in Enketo: when a condition is not met

Data entry screen as seen in Enketo: when a condition is not met

Data entry screen as seen in Enketo: when a condition is not met

Data entry screen as seen in Enketo: when a condition is met

Reference xlsform:

Regex.xlsx (10.3 KB)

1 Like

It’s working amazingly. Thanks a lot BOSS. You are superhero.

1 Like

Hello @Kal_Lam,
Nice example! Maybe also for the KoBo documentation.
(Side-note: “Regex” as name might be confusing, it is more a numeric constraint.).
Kind regards