regex pater только за 4 или 6 цифр

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