This alternative version uses \d in place of [0-9]: Number: 435 Category: Account Identifier Description: SSN: XXX-XX-XXXX or FOREIGN Validation: ^(\d{3}-\d{2}-\d{4}|FOREIGN)$ Message: Fill in like this: XXX-XX-XXXX or FOREIGN Location: Between #122 and #162