Regex not working in Qualtrics | Experience Community
Skip to main content

Regex not working in Qualtrics

  • Sep 11, 2026 11:44 AM UTC
  • 6 replies
  • 117 views

Forum|alt.badge.img+1

I can’t seem to get custom validation regex working properly.

At this point it feels like I’ve tried everything.

I want to validate that the answer is a 9 digit number.

So I would expect a regex like ^\d{9}$ to work.

I’ve also tried ^[0-9]{9}$ and same thing there.

Anyone who knows how you are supposed to do this?

Sep 11, 2026 12:42 PM UTC

I’d open a ticket, this is not expected behavior. I have the exact same setup and the validation passes on “123456789”.

 

6 replies

vgayraud
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+68
  • QPN Level 8 ●●●●●●●●
  • Sep 11, 2026 12:12 PM UTC
^\d{9}$

works fine for me, both in legacy layouts and NTSE, whether in text entry questions or forms.

Can you share the rest of your question setup?


Forum|alt.badge.img+1
  • Author
  • Sep 11, 2026 12:36 PM UTC

​@vgayraud Thanks for replying!

I have created a new survey using NTSE (I belive it’s called?)

Single question. Custom validation.

Adding some screenshots.

 

 


vgayraud
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+68
  • QPN Level 8 ●●●●●●●●
  • Sep 11, 2026 12:42 PM UTC

I’d open a ticket, this is not expected behavior. I have the exact same setup and the validation passes on “123456789”.

 


Forum|alt.badge.img+1
  • Author
  • Sep 11, 2026 12:52 PM UTC

​@vgayraud Would you mind generating a single question survey .qsf file that you can share?

I’m just wondering if I’m messing something up somehow and would like to compare.


vgayraud
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+68
  • QPN Level 8 ●●●●●●●●
  • Sep 11, 2026 12:57 PM UTC

Sure, here you go. Remove txt extension (community site doesn’t allow qsf uploads).

 


Forum|alt.badge.img+1
  • Author
  • Sep 14, 2026 7:48 AM UTC

Sure, here you go. Remove txt extension (community site doesn’t allow qsf uploads).

 

Thanks! Wierdly enough when we upload your .qsf file to our environment regex still doesn’t work. Time to make a ticket.