AnsweredAssumed Answered

Regex function syntax

Question asked by svanlillesri-ireland-ie-esridist Employee on Nov 6, 2018
Latest reply on Nov 6, 2018 by svanlillesri-ireland-ie-esridist

Hi all.

I'm having some syntax issues with the regex function added to the constraints field. If anyone can show me where I'm going wrong, that'll be great.


I have some special characters in a text field that I don't want to allow. If the user populates the text field with one or more of these characters, I want the validation to fail with an error message. The special characters I do NOT allow are: " or ` or > or < or ; or \.

I tried the following (and various iterations of it); 



but once I add the ' or the \, it fails to refresh the survey.


regex(.,'(^[a-zA-Z0-9,*!£%^&)(+=@:#~/?. ]+$)')

where I add all the characters I want to allow, but this fails to refresh when I add { or } or [ or ].


Any help appreciated.