Regex Pater tylko dla 4 lub 6 cyfr

^([0-9]{4}|[0-9]{6})$
Jealous Jay