Hello there!
I'm using the following RegExp test to validate Irish number plates
The standard Irish number plate since 1987 has the format YY-CC-SSSSSS, where
• YY — a 2-digit year (e.g. 87 for 1987; 05 for 2005)
• CC — a 1- or 2-character county identifier (e.g. D for Dublin; SO for Sligo).
• SSSSSS — a 1- to 6-digit sequence number
e.g. 00D123
I want to improve my function above to make it more exact, i.e.
YY: only those beginning with 8, 9 or 0
CC: only the following:
C - County Cork
CE - County Clare
CN - County Cavan
CW - County Carlow
D - County Dublin
DL - County Donegal
G - County Galway
KE - County Kildare
KK - County Kilkenny
KY - County Kerry
L - Limerick City
LD - County Longford
LH - County Louth
LK - County Limerick
LM - County Leitrim
LS - County Laois
MH - County Meath
MN - County Monaghan
MO - County Mayo
OY - County Offaly
RN - County Roscommon
SO - County Sligo
TN - North Tipperary
TS - South Tipperary
W - Waterford City
WD - County Waterford
WH - County Westmeath
WX - County Wexford
WW - County Wicklow
Can anyone help me out here? Thanks, JimmyG
I'm using the following RegExp test to validate Irish number plates
Code:
Function IsValidVReg_IE1(value As String) As Boolean
Dim RE As Object
Set RE = CreateObject("vbscript.RegExp")
RE.Pattern = "^\d{2}[A-Z]{1,2}\d{1,6}$"
IsValidVReg_IE1 = RE.Test(value)
Set RE = Nothing
End Function
The standard Irish number plate since 1987 has the format YY-CC-SSSSSS, where
• YY — a 2-digit year (e.g. 87 for 1987; 05 for 2005)
• CC — a 1- or 2-character county identifier (e.g. D for Dublin; SO for Sligo).
• SSSSSS — a 1- to 6-digit sequence number
e.g. 00D123
I want to improve my function above to make it more exact, i.e.
YY: only those beginning with 8, 9 or 0
CC: only the following:
C - County Cork
CE - County Clare
CN - County Cavan
CW - County Carlow
D - County Dublin
DL - County Donegal
G - County Galway
KE - County Kildare
KK - County Kilkenny
KY - County Kerry
L - Limerick City
LD - County Longford
LH - County Louth
LK - County Limerick
LM - County Leitrim
LS - County Laois
MH - County Meath
MN - County Monaghan
MO - County Mayo
OY - County Offaly
RN - County Roscommon
SO - County Sligo
TN - North Tipperary
TS - South Tipperary
W - Waterford City
WD - County Waterford
WH - County Westmeath
WX - County Wexford
WW - County Wicklow
Can anyone help me out here? Thanks, JimmyG
Last edited by a moderator: