Text Validation Regex Help | XM Community
Skip to main content

Hello,

I have a text field that needs the following validation

It should either start with J (and have 5 numeric characters after) or start with P (and have 6 numeric characters after it). However, the following RegEx fails for me, 

 

Could you help me understand how I can get that validation setup?

I think your regex’s should be: ^J\d{5}$ and ^P\d{6}$


Leave a Reply