Hello, I am trying to limit an address input in Survey123 by adding a constraint . I am using the regex below to achieve this goal.
regex(., "^(\\d{1,})\\s{1,}(North|South|East|West|N|S|E|W|NE|NW|SE|SW)\\s{1,}(\\w{1,})\\s{1,}(\\w{1,})((,{1}\\s{1,})|\\s{1,})(North|South|East|West|N|S|E|W|NE|NW|SE|SW),\\s{1,}(\\w{1,}),\\s{1,}(\\w{2}),\\s{1,}(\\d{5})$")
I used this same regex in a python script with success, so the logic is correct. I'm not sure what I am doing wrong. Am I missing something?
Note: The regex should accept an address with the following format: "111 N Street St N, City, OH, 44444"