How can i set a limit on a XLSForm for wordcount in a text answer

How can i set a limit on a XLSForm for wordcount in a text answer ?
I tried some regex codes (i’m not sure which one works best)
and where should i plug in the code in the XLSForm? under “appear”? “relevant”?? i tried them it didn’t work…

Welcome to the community, @nz54! This support article Restricting Text Responses With Regular Expressions should help solve your issue.