How to use Regex set up an unique survey ID? | XM Community
Skip to main content
Solved

How to use Regex set up an unique survey ID?


Hello community! I need to set up a validation of a Text entry box for a specific format. I ask participants to create their own unique survey ID for a longitude study. The requirements of the participant ID is below: "Using last 4 digits of your mobile number PLUS initial of your mother’s maiden name" Example: (mobile number: 04051314516, mother’s maiden name: Julie Smith) => 4516JS I want to make sure people put exactly 4 digits plus 2 characters in to the text entry box. Anyone know how to do this?

Best answer by Anonymous

Hello @GX123 , Try the below regex...... `^[0-9]{4}[A-Z]{2}$`
View original

4 replies

  • 0 replies
  • Answer
  • May 13, 2019
Hello @GX123 , Try the below regex...... `^[0-9]{4}[A-Z]{2}$`

  • Author
  • 4 replies
  • June 17, 2019
Hi Shashi, Thank you for the reply. As I am new to Qualtrics, could you please clarify how to insert the regex that you provided into the survey setting?

  • 0 replies
  • June 17, 2019
> @GX123 said: > Hi Shashi, > > Thank you for the reply. > > As I am new to Qualtrics, could you please clarify how to insert the regex that you provided into the survey setting? Go to custom validation -> in the drop down select "Matches regex" -> and in the text entry box paste the regex. Resource

  • Author
  • 4 replies
  • June 21, 2019
Thank you Shashi!! It works out well.

Leave a Reply