How to use Regex set up an unique survey ID?

GX123GX123 Community Member Qubie ✭

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

  • ShashiShashi India Wizard ✭✭✭✭✭
    Accepted Answer

    Hello @GX123 ,

    Try the below regex......

    ^[0-9]{4}[A-Z]{2}$

Answers

  • GX123GX123 Community Member Qubie ✭

    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?

  • ShashiShashi IndiaCommunity Member Wizard ✭✭✭✭✭

    @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

Sign In to Comment