I need to validate postcodes (called eircodes) for the Republic of Ireland.
For the UK I used the regex /^(GIR|[A-Z]\d[A-Z\d]??|[A-Z]{2}\d[A-Z\d]??)[ ]??(\d[A-Z]{2})$/
. I don’t know whether this also applies to Republic of Ireland or whether it have its own specific regex.