If you haven't already, you may want to read our previous post on this topic: Introducing Regular Expressions
Regular Expressions (Regex) is a very powerful tool for validation, search, replacing sub-strings, data comparison, cleaning up, data wrangling and scraping (especially web scraping).
And it is used in validation for collecting data in almost all available tools, even for non technical people such as Excel/Google sheets and even in Kobo.
Therefore, I have created a simple tool to generate Regular Expressions for specific validations for Kobo Forms (Python flavored).
Through this tool you may set the acceptance criteria based on:
Language : English, Arabic, Eng+Ar
Accepted Characters: Letters Only, Number Only, Alphanumeric
Minimum number of characters
Maximum number of characters
If a "space" is allowed or not
All you need to do is access the sheet by clicking on the picture below, pick your preference from the drop down and grab your RegEx!
Now for your Kobo forms, all you need is to access your form, add a new question and follow the steps:
Click on the settings gear in the top right of the Question box
Click on Validation Criteria
Click on "Manually enter your validation logic in XLSForm code"
Paste the RegEx generated in the sheet in : Validation Code
And let me know what you think.