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