regex 4 digits in a row code example Example: regex pater for only 4 or 6 digits ^([0-9]{4}|[0-9]{6})$