public Constraint regexp ( String regexp , String type ) { RegexpConstraint c = new RegexpConstraint ( regexp ) ; c . setType ( type ) ; return c ; }
Creates a constraint backed by a regular expression with a type for reporting .