Regex examples for Allowed Inputs

Thought I'd put the regex I am using to validate inputs in the Allowed Inputs. These work when using a Validation Type of regexp after setting Enable Validation Type. Others please add more!

US ZIP Code: ^\d{5}(?:[-\s]\d{4})?$
Phone Number: ^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$
Exact length: ^.{4}$

1 Like