I'm not a dummy, but I feel so stupid right now and I'm so frustrated that I want to cry. I've tried, on several random occasions over the past few weeks, to try and figure out out how to get perhaps the simplest regex in the history of regex to work in a constraint in my survey. I've tried literally EVERYTHING. I've taken tutorials, googled my brains out, tested regex on regex101.com, but no matter how many times I think I've written something that will work, it just doesn't when I use it as a constraint in Survey123 Connect.
All I'm trying to do is constrain a free text field in my survey to one, single word of any length.
I'm too frustrated to recap what I've tried thus far and the lengths of finagling I've gone to in order to craft a regex that would do what I believe is a really, really simple validation. I'm hoping that there's someone in the community who would kindly drop the right way to write the constraint expression in a reply.
regex(.,'<whatever the heck forces only one word/no whitespace entered>')
Many thanks in advance to the first person who can save my sanity,
Solved! Go to Solution.