AnsweredAssumed Answered

Trouble with Regular Expressions

Question asked by jsackrider on Dec 8, 2016

Having trouble writing a regular expression to restrict inputs for a text field.  I would like to restrict the values to xxxxx-xxx where the "x" are integers.  From what I understand, {n} limits to "n" number of values (5 & 3 in this case), however when testing in the form preview, the constraint is satisfied as long as there are "n" or more values. Is there something I am missing?  I have attached my excel file, and included my expression below.  Any help is much appreciated.

 

regex(.,'[0-9]{5}'+'-'+'[0-9]{3}') 

Attachments

Outcomes