How to validate a response to 3 digits followed by one uppercase letter

Hi everyone, I am very new to Kobo. In my form, I want to enter a participant ID that would be three digits coupled with an uppercase letter, such as “872M” or “528L”. The code I am using is

regex(., ‘[1]{3}.[A-Z]{1}.$’)

But this does not seem to work.

Thanks


  1. 0-9 ↩︎

Hi @prasenjit_mondal, Welcome to community!

You can use regex(., '^[0-9]{3}[A-Z]$') and you can use this documentation for future references

https://support.kobotoolbox.org/restrict_responses.html

image


1 Like

@osmanburcu Thanks much. this was very helpful.

1 Like

@osmanburcu, :bowing_man: :pray: