regex starting with 9 and 9 digit code example Example: regex pater for only 4 or 6 digits ^([0-9]{4}|[0-9]{6})$