Hello,
I’m having problems with regular expression. How can I achieve this?
The only allowed characters are alphabets (uppercase and lowercase), numbers, hypen, period, comma and it cannot begin or end in either space or line break.
EDIT: It should also allow ñ and Ñ
Thanks!
Kal_Lam
October 23, 2020, 12:40pm
2
Does it require a space in the middle? Could you provide an example of some input so that it would give us a clue on how it should look like.
Space in the middle is allowed. But space in front and end is not allowed also with line breaks.
Example: person names like George Clooney, or maybe address.
EDIT: It should also allow ñ and Ñ
Thanks
Kal_Lam
October 23, 2020, 12:51pm
4
Is there any word limit/character limit for the same?
There is a 255 limit for characters but I’ve implemented a different approach; a combination of string-length(.) and regex on the constraint column.
Would you mind trying this as outlined in the image below (it should solve your issue):
In the survey tab of your xlsform:
Data entry screen as seen in Enketo: With space in the beginning
Data entry screen as seen in Enketo: Without space in the beginning
Reference xlsform:
Regex.xlsx (10.1 KB)
1 Like