Correct regex for IE VAT numbers

According to http://www.hmrc.gov.uk/vat/managing/international/esl/country-codes.htm VAT numbers for Ireland have the following format (where "X" is [A-Z]):

1234567X
1X23456X
1234567XX
(8 or 9 characters)

The proposed change allows for an optional, penultimate alpha character.