Repository: Collen-Roller/flydenity

Issue:
Split 'iso codes'
Current state:
{'iso codes': "['US', 'USA']"}
The string "['US', 'USA']" need further steps until we get the iso2 or iso3

Better (in my opinion):
{'iso codes': ['US', 'USA']}
or
{'iso2': 'US', 'iso3': 'USA'}

Discussion:

Patch:
diff --git a/flydenity/parser.py b/flydenity/parser.py
index 1afc87a..5fe97b9 100644
--- a/flydenity/parser.py
+++ b/flydenity/parser.py
@@ -7,56 +7,93 @@ collen.roller@gmail.com
 Main parser for Regexs that exist within the dataset
 """
 
-import pandas as pd
-import ast
 import os
 import re
-import sys
+import csv
 
-class ARParser():
 
+CURRENT_PATH = os.path.dirname(__file__)
+DATASET_FILES = {
+    "countries": "processed_itu_countries_regex.csv",
+    "organizations": "processed_itu_organizations_regex.csv"
+}
 
-    dataset_files = {"countries":os.path.join(os.path.dirname(__file__),
-                     "processed_itu_countries_regex.csv"),
-                     "organizations":os.path.join(os.path.dirname(__file__),
-                     "processed_itu_organizations_regex.csv")}
 
+class ARParser():
     def __init__(self):
-        self.datasets_loaded = False
-        self.load_datasets(self.dataset_files)
-
-    def load_datasets(self, files):
-        try:
-            if files is not None:
-                self.dfs = {}
-                for key, f in files.items():
-                    self.dfs[key] = pd.read_csv(f)
-                self.datasets_loaded = True
-            else:
-                self.print_dataset_error()
-        except:
-            self.print_dataset_error()
-
-    def parse(self, callsign):
-        res = []
-        if not self.datasets_loaded:
-            self.load_datasets(self.dataset_files)
+        # read the input files into the callsign mapping: callsign -> [data1, data2, ...]
+        self.callsigns = {}
+        for dataset_type in DATASET_FILES:
+            with open(os.path.join(CURRENT_PATH, DATASET_FILES[dataset_type])) as csvfile:
+                csvreader = csv.reader(csvfile)
+                header = next(csvreader)
+                for row in csvreader:
+                    raw_data = {key: value for (key, value) in zip(header, row)}
+                    
+                    data = {}
+                    if 'nation' in raw_data:
+                        data['type'] = 'country'
+                        data['nation'] = raw_data['nation']
+                        iso_codes = [iso[1:-1] for iso in raw_data['iso codes'][1:-1].split(', ')]
+                        data['iso2'] = iso_codes[0]
+                        data['iso3'] = iso_codes[1]
+                    elif 'name' in raw_data:
+                        data['type'] = 'organization'
+                        data['name'] = raw_data['name']
+                    else:
+                        raise ValueError(f"Input file for {dataset_type} '{DATASET_FILES[dataset_type]}' is corrupt.")
+                    
+                    data['description'] = raw_data['description']
+                    data['callsigns'] = [callsign[1:-1] for callsign in raw_data['callsign'][1:-1].split(', ')]
+                    data['suffixes'] = [suffix[1:-1] for suffix in raw_data['suffix'][1:-1].split(', ')]
+                    data['regex'] = re.compile(raw_data['regex'])
+
+                    strict_regex = raw_data['regex'].replace('-{0,1}', '\-').replace('{0,1}$', '$')
+                    data['strict_regex'] = re.compile(strict_regex)
+
+                    for callsign in data['callsigns']:
+                        if callsign not in self.callsigns:
+                            self.callsigns[callsign] = [data]
+                        else:
+                            self.callsigns[callsign].append(data)
+
+        self.min_callsign_len = min([len(callsign) for callsign in self.callsigns.keys()])
+        self.max_callsign_len = max([len(callsign) for callsign in self.callsigns.keys()])
+
+    def parse(self, string, strict=False):
+        # find the datasets matching with the string
+        datasets = []
+        for callsign_len in range(self.min_callsign_len, self.max_callsign_len+1):
+            if string[0:callsign_len] in self.callsigns.keys():
+                datasets.extend(self.callsigns[string[0:callsign_len]])
+
+        # return None if no dataset found
+        if datasets == []:
+            return None
+
+        # match the string with the datasets
+        country_matches = []
+        organization_matches = []
+        for data in datasets:
+            match = data['strict_regex'].match(string) if strict is True else data['regex'].match(string)
+            if match:
+                if data['type'] == 'country':
+                    country_matches.append({
+                        'nation': data['nation'],
+                        'description': data['description'],
+                        'iso2': data['iso2'],
+                        'iso3': data['iso3']
+                    })
+                elif data['type'] == 'organization':
+                    organization_matches.append({
+                        'name': data['name'],
+                        'description': data['description']
+                    })
+
+        # return matches we found
+        if len(country_matches) > 0 or len(organization_matches) > 0:
+            return country_matches + organization_matches
+
+        # return None if the string doesn't match with any of the datasets
         else:
-            #parse the data
-            for key, df in self.dfs.items():
-                for index, entry in df.iterrows():
-                    result = re.match(entry['regex'], callsign)
-                    if result is not None:
-                        #print("Success!")
-                        #print(entry)
-                        codes = ast.literal_eval(entry["iso codes"])
-                        print(codes)
-                        res.append({"nation":entry["nation"],
-                                    "description":entry["description"],
-                                    "iso codes":codes})
-
-        return res
-
-    def print_dataset_error(self):
-        print("Can't identify dataset, try loading it manually")
-        print("Use load_dataset(<tags.csv>)")
+            return None
diff --git a/flydenity/processed_itu_countries.csv b/flydenity/processed_itu_countries.csv
index 18467b9..7c79950 100644
--- a/flydenity/processed_itu_countries.csv
+++ b/flydenity/processed_itu_countries.csv
@@ -171,11 +171,11 @@ Iceland,microlights,"['IS', 'ISL']",['TF'],['100-999']
 India,general,"['IN', 'IND']","['AT', 'AU', 'AV', 'AW', 'VT', 'VU', 'VV', 'VW', '8T', '8U', '8V', '8W', '8X', '8Y']",['AAA-ZZZ']
 Indonesia,general,"['ID', 'IDN']","['JZ', 'PK', 'PL', 'PM', 'PN', 'PO', 'YB', 'YC', 'YD', 'YE', 'YF', 'YG', 'YH', '7A', '7B', '7C', '7D', '7E', '7F', '7G', '7H', '7I', '8A', '8B', '8C', '8D', '8E', '8F', '8G', '8H', '8I']",['AAA-ZZZ']
 Iran,general,"['IR', 'IRN']","['EP', 'EQ', '9B', '9C', '9D']",['AAA-ZZZ']
-Iraq,general,"['IQ', 'IRQ']","['HN', ' YI']",['AAA-ZZZ']
+Iraq,general,"['IQ', 'IRQ']","['HN', 'YI']",['AAA-ZZZ']
 Ireland,general,"['IE', 'IRL']","['EI', 'EJ']",['AAA-ZZZ']
 Ireland,VIP or business,"['IE', 'IRL']","['EI', 'EJ']",['AAAA-ZZZZ']
 Isle of Man,general,"['IM', 'IMN']",['M'],['AAAA-ZZZZ']
-Israel,general,"['IL', 'ISR']","['4X', ' 4Z']",['AAA-ZZZ']
+Israel,general,"['IL', 'ISR']","['4X', '4Z']",['AAA-ZZZ']
 Italy,general,"['IT', 'ITA']",['I'],"['AAAA-ZZZZ','0001-Z999']"
 Ivory Coast or Cote d'Ivoire,general,"['CI', 'CIV']",['TU'],['AAA-ZZZ']
 Jamaica,general,"['JM', 'JAM']",['6Y'],['AAA-ZZZ']
@@ -186,17 +186,17 @@ Kazakhstan,general,"['KZ', 'KAZ']","['UN', 'UO', 'UP', 'UQ']",['AAA01-ZZZ99']
 Kenya,general,"['KE', 'KEN']","['5Y', '5Z']",['AAA-ZZZ']
 Kiribati,general,"['KI', 'KIR']",['T3'],['AAA-ZZZ']
 North Korea,general,"['KP', 'PRK']","['HM', 'P5', 'P6', 'P7', 'P8', 'P9']",['500-999']
-South Korea,ultralights,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['C000-C999']
-South Korea,gliders,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['0000-0599']
-South Korea,airships,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['0600-0799']
-South Korea,piston engines,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']","['1000-1799','2000-2099']"
-South Korea,turboprops,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['5100-5499']
-South Korea,piston engine helicopters,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['6100-6199']
-South Korea,single turbojets,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['7100-7199']
-South Korea,twin-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']","['7200-7299', '7500-7599', '7700-7799', '7800-7899', '8000-8099', '8200-8299']"
-South Korea,tri-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['7300-7399']
-South Korea,quad-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']","['7400-7499', '7600-7699', '8400-8499', '8600-8699']"
-South Korea,turboshaft helicopters,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['9100-9699']
+South Korea,ultralights,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['C000-C999']
+South Korea,gliders,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['0000-0599']
+South Korea,airships,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['0600-0799']
+South Korea,piston engines,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']","['1000-1799','2000-2099']"
+South Korea,turboprops,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['5100-5499']
+South Korea,piston engine helicopters,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['6100-6199']
+South Korea,single turbojets,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['7100-7199']
+South Korea,twin-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']","['7200-7299', '7500-7599', '7700-7799', '7800-7899', '8000-8099', '8200-8299']"
+South Korea,tri-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['7300-7399']
+South Korea,quad-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']","['7400-7499', '7600-7699', '8400-8499', '8600-8699']"
+South Korea,turboshaft helicopters,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['9100-9699']
 Kosovo,general,"['XK', 'XKX']",['Z6'],['AAA-ZZZ']
 Kuwait,general,"['KW', 'KWT']",['9K'],['AAA-ZZZ']
 Kyrgyzstan,general,"['KG', 'KGZ']",['EX'],"['100-999','10000-99999']"
@@ -204,7 +204,7 @@ Laos,general,"['LA', 'LAO']","['XW','RDPL']",['10000-99999']
 Latvia,general,"['LV', 'LVA']",['YL'],['AAA-ZZZ']
 Lebanon,general,"['LB', 'LBN']",['OD'],['AAA-ZZZ']
 Lesotho,general,"['LS', 'LSO']",['7P'],['AAA-ZZZ']
-Liberia,general,"['LR', 'LBR']","['A8', ' D5', ' EL', '5L', '5M', ' 6Z']",['AAA-ZZZ']
+Liberia,general,"['LR', 'LBR']","['A8', 'D5', 'EL', '5L', '5M', '6Z']",['AAA-ZZZ']
 Libya,general,"['LY', 'LBY']",['5A'],['AAA-ZZZ']
 Liechtenstein,general,"['LI', 'LIE']","['HB', 'HB0', 'HB3Y', 'HBL']",['AAA-ZZZ']
 Lithuania,general,"['LT', 'LTU']",['LY'],['AAA-ZZZ']
@@ -218,11 +218,11 @@ Macedonia,general,"['MK', 'MKD']",['Z3'],['AAA-ZZZ']
 Macedonia,helicopters,"['MK', 'MKD']",['Z3'],['HAA-HZZ']
 Macedonia,ultralights,"['MK', 'MKD']",['Z3'],['UA-001-UA-999']
 Macedonia,balloons,"['MK', 'MKD']",['Z3'],['OAA-OZZ']
-Madagascar,general,"['MG', 'MDG']","['5R', '5S', ' 6X']",['AAA-ZZZ']
+Madagascar,general,"['MG', 'MDG']","['5R', '5S', '6X']",['AAA-ZZZ']
 Malawi,general,"['MW', 'MWI']",['7Q'],['AAA-ZZZ']
-Malaysia,general,"['MY', 'MYS']","['9M', ' 9W']",['AAA-ZZZ']
-Malaysia,amateur-builts,"['MY', 'MYS']","['9M', ' 9W']",['EAA-EZZ']
-Malaysia,ultralights,"['MY', 'MYS']","['9M', ' 9W']",['UAA-UZZ']
+Malaysia,general,"['MY', 'MYS']","['9M', '9W']",['AAA-ZZZ']
+Malaysia,amateur-builts,"['MY', 'MYS']","['9M', '9W']",['EAA-EZZ']
+Malaysia,ultralights,"['MY', 'MYS']","['9M', '9W']",['UAA-UZZ']
 Maldives,general,"['MV', 'MDV']",['8Q'],['AAA-ZZZ']
 Mali,general,"['ML', 'MLI']",['TZ'],['AAA-ZZZ']
 Malta,general,"['MT', 'MLT']",['9H'],['AAA-ZZZ']
@@ -258,10 +258,10 @@ New Zealand,gliders,"['NZ', 'NZL']",['ZK'],['G**']
 New Zealand,helicopters,"['NZ', 'NZL']",['ZK'],"['H**','I**']"
 New Zealand,gyrocopters,"['NZ', 'NZL']",['ZK'],"['R**','RB*','RC*','RD*']"
 New Zealand,ICAO prohibited,"['NZ', 'NZL']",['ZK'],['Q**']
-Nicaragua,general,"['NI', 'NIC']","['HT', 'H6', 'H7', ' YN']",['AAA-ZZZ']
+Nicaragua,general,"['NI', 'NIC']","['HT', 'H6', 'H7', 'YN']",['AAA-ZZZ']
 Niger,general,"['NE', 'NER']",['5U'],['AAA-ZZZ']
 Nigeria,general,"['NG', 'NGA']","['5N', '5O']",['AAA-ZZZ']
-Norway,general,"['NO', 'NOR']","['JW', 'JX', 'LA', 'LB', 'LC', 'LD', 'LE', 'LF', 'LG', 'LH', 'LI', 'LJ', 'LK', 'LL', 'LM', 'LN', ' 3Y']",['AAA-ZZZ']
+Norway,general,"['NO', 'NOR']","['JW', 'JX', 'LA', 'LB', 'LC', 'LD', 'LE', 'LF', 'LG', 'LH', 'LI', 'LJ', 'LK', 'LL', 'LM', 'LN', '3Y']",['AAA-ZZZ']
 Norway,gliders,"['NO', 'NOR']",['LN'],['GAA-GZZ']
 Norway,helicopters,"['NO', 'NOR']",['LN'],['OAA-OZZ']
 Norway,balloons,"['NO', 'NOR']",['LN'],['CAA-CZZ']
@@ -271,10 +271,10 @@ Pakistan,general,"['PK', 'PAK']","['AP', 'AQ', 'AR', 'AS', '6P', '6Q', '6R', '6S
 Palau,general,"['PW', 'PLW']",['T8'],['AAA-ZZZ']
 Palestinian Authority,general,"['PS', 'PSE']",['E4'],['AAA-ZZZ']
 Palestinian Authority,general,"['PS', 'PSE']",['SU-Y'],['AA-ZZ']
-Panama,general,"['PA', 'PAN']","['HO', 'HP', ' H3', 'H8', 'H9', '3E', '3F']",['AAA-ZZZ']
+Panama,general,"['PA', 'PAN']","['HO', 'HP', 'H3', 'H8', 'H9', '3E', '3F']",['AAA-ZZZ']
 Papua New Guinea,general,"['PG', 'PNG']",['P2'],['AAA-ZZZ']
 Paraguay,general,"['PY', 'PRY']",['ZP'],['AAA-ZZZ']
-Peru,general,"['PE', 'PER']","['OA', 'OB', 'OC', ' 4T']",['1000-9999']
+Peru,general,"['PE', 'PER']","['OA', 'OB', 'OC', '4T']",['1000-9999']
 Philippines,general,"['PH', 'PHL']","['RP', 'DU', 'DV', 'DW', 'DX', 'DY', 'DZ', '4D', '4E', '4F', '4G', '4H', '4I']",['AAA-ZZZ']
 Philippines,government,"['PH', 'PHL']",['RP'],['0001-9999']
 Philippines,registered aircraft,"['PH', 'PHL']",['RP'],['C0001-C9999']
@@ -282,7 +282,7 @@ Philippines,gliders,"['PH', 'PHL']",['RP'],['G0001-G9999']
 Philippines,limited,"['PH', 'PHL']",['RP'],['R0001-R9999']
 Philippines,unmanned,"['PH', 'PHL']",['RP'],['U001A-U999Z']
 Philippines,experimental,"['PH', 'PHL']",['RP'],['X0001-X9999']
-Poland,general,"['PL', 'POL']","['HF', 'SN', 'SO', 'SP', 'SQ', 'SR', ' 3Z']",['AAA-ZZZ']
+Poland,general,"['PL', 'POL']","['HF', 'SN', 'SO', 'SP', 'SQ', 'SR', '3Z']",['AAA-ZZZ']
 Poland,motor-gliders,"['PL', 'POL']",['SP'],['0***']
 Poland,gliders,"['PL', 'POL']",['SP'],"['1***-3***','8***']"
 Poland,balloons,"['PL', 'POL']",['SP'],['B**']
@@ -323,7 +323,7 @@ Serbia,ultralights,"['RS', 'SRB']","['YT', 'YU']",['A000-Z999']
 Serbia,drones,"['RS', 'SRB']","['YT', 'YU']",['D0000-D9999']
 Seychelles,general,"['SC', 'SYC']",['S7'],['AAA-ZZZ']
 Sierra Leone,general,"['SL', 'SLE']",['9L'],['AAA-ZZZ']
-Singapore,general,"['SG', 'SGP']","['9V', ' S6']",['AAA-ZZZ']
+Singapore,general,"['SG', 'SGP']","['9V', 'S6']",['AAA-ZZZ']
 Slovakia,general,"['SK', 'SVK']",['OM'],['AAA-ZZZ']
 Slovakia,ultralights,"['SK', 'SVK']",['OM'],['AAAA-ZZZZ']
 Slovakia,microlights,"['SK', 'SVK']",['OM'],['M000-M999']
@@ -339,7 +339,7 @@ Slovenia,double-seat gliders,"['SI', 'SVN']",['S5'],['7000-7999']
 Slovenia,motorgliders,"['SI', 'SVN']",['S5'],['KAA-KZZ']
 Slovenia,balloons,"['SI', 'SVN']",['S5'],['OAA-OZZ']
 Solomon Islands,general,"['SB', 'SLB']",['H4'],['AAA-ZZZ']
-Somalia,general,"['SO', 'SOM']","['6O', ' T5']",['AAA-ZZZ']
+Somalia,general,"['SO', 'SOM']","['6O', 'T5']",['AAA-ZZZ']
 South Africa,general,"['ZA', 'ZAF']","['S8', 'ZR', 'ZS', 'ZT', 'ZU']",['AAA-ZZZ']
 South Sudan,general,"['SS', 'SSD']",['Z8'],['AAA-ZZZ']
 Spain,general,"['ES', 'ESP']","['AM', 'AN', 'AO', 'EA', 'EB', 'EC', 'ED', 'EE', 'EF', 'EG', 'EH']",['AAA-WZZ']
@@ -353,31 +353,31 @@ Suriname,helicopters,"['SR', 'SUR']",['PZ'],['HAA-HZZ']
 Suriname,commercial,"['SR', 'SUR']",['PZ'],['TAA-TZZ']
 Suriname,agricultural,"['SR', 'SUR']",['PZ'],['UAA-UZZ']
 Swaziland or Eswatini,general,"['SZ', 'SWZ']","['3D', '3DA', '3DB', '3DC', '3DD', '3DE', '3DF', '3DG', '3DH', '3DI', '3DJ', '3DK', '3DL', '3DM']",['AAA-ZZZ']
-Sweden,general,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['AAA-ZZZ']
-Sweden,jets,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']","['DAA-DZZ','RAA-RZZ']"
-Sweden,helicopters,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['HAA-HZZ']
-Sweden,gliders,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['SAA-UZZ']
-Sweden,ultralights,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']","['VAA-VZZ','YAA-YZZ']"
-Sweden,amuture builds,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['XAA-XZZ']
-Sweden,lighter than air,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['ZAA-ZZZ']
-Sweden,test and delivery,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['A01-Z99']
-Switzerland,general,"['CH', 'CHE']","['HB', ' HE']",['AAA-ZZZ']
-Syria,general,"['SY', 'SYR']","['YK', ' 6C']",['AAA-ZZZ']
-Tahiti or French Polynesia,general,"['PF','PYF']",['F-OH'],['AA-ZZ']
-Taiwan,general,"['TW', 'TWN']","['B', 'BM', ' BN', ' BO', ' BQ', ' BV', ' BX']",['00000-99999']
+Sweden,general,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['AAA-ZZZ']
+Sweden,jets,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']","['DAA-DZZ','RAA-RZZ']"
+Sweden,helicopters,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['HAA-HZZ']
+Sweden,gliders,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['SAA-UZZ']
+Sweden,ultralights,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']","['VAA-VZZ','YAA-YZZ']"
+Sweden,amuture builds,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['XAA-XZZ']
+Sweden,lighter than air,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['ZAA-ZZZ']
+Sweden,test and delivery,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['A01-Z99']
+Switzerland,general,"['CH', 'CHE']","['HB', 'HE']",['AAA-ZZZ']
+Syria,general,"['SY', 'SYR']","['YK', '6C']",['AAA-ZZZ']
+Tahiti or French Polynesia,general,"['PF', 'PYF']",['F-OH'],['AA-ZZ']
+Taiwan,general,"['TW', 'TWN']","['B', 'BM', 'BN', 'BO', 'BQ', 'BV', 'BX']",['00000-99999']
 Tajikistan,general,"['TJ', 'TJK']",['EY'],['00000-99999']
 Tanzania,general,"['TZ', 'TZA']","['5H', '5I']",['AAA-ZZZ']
-Thailand,general,"['TH', 'THA']","['E2', ' HS']",['AAA-ZZZ']
+Thailand,general,"['TH', 'THA']","['E2', 'HS']",['AAA-ZZZ']
 Timor–Leste,general,"['TL', 'TLS']",['4W'],['AAA-ZZZ']
 Togo,general,"['TG', 'TGO']",['5V'],['AAA-ZZZ']
 Tonga,general,"['TO', 'TON']",['A3'],['AAA-ZZZ']
 Trinidad and Tobago,general,"['TT', 'TTO']","['9Y', '9Z']",['AAA-ZZZ']
-Tunisia,general,"['TN', 'TUN']","['TS', ' 3V']",['AAA-ZZZ']
-Turkey,general,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['AAA-ZZZ']
-Turkey,balloons,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['BAA-BZZ']
-Turkey,helicopters,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['HAA-HZZ']
-Turkey,gliders,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['PAA-PZZ']
-Turkey,ultralights,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['UAA-UZZ']
+Tunisia,general,"['TN', 'TUN']","['TS', '3V']",['AAA-ZZZ']
+Turkey,general,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['AAA-ZZZ']
+Turkey,balloons,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['BAA-BZZ']
+Turkey,helicopters,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['HAA-HZZ']
+Turkey,gliders,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['PAA-PZZ']
+Turkey,ultralights,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['UAA-UZZ']
 Turkey,agricultural,"['TR', 'TUR']","['TA', 'TB', 'TC','YM']",['ZAA-ZZZ']
 Turkmenistan,general,"['TM', 'TKM']",['EZ'],['A100-Z999']
 Turks and Caicos Islands,general,"['TC', 'TCA']",['VQ-T'],['AA-ZZ']
@@ -385,8 +385,8 @@ Tuvalu,general,"['TV', 'TUV']",['T2'],['AAA-ZZZ']
 Uganda,general,"['UG', 'UGA']",['5X'],['AAA-ZZZ']
 Ukraine,general,"['UA', 'UKR']","['EM', 'EN', 'EO', 'UR', 'US', 'UT', 'UU', 'UV', 'UW', 'UX', 'UY', 'UZ']","['AAA-ZZZ','10000-99999','AAAA-ZZZZ']"
 United Arab Emirates,general,"['AE', 'ARE']",['A6'],['AAA-ZZZ']
-United Kingdom,general,"['GB', 'GBR']","['2', ' G', ' M', 'VP', 'VQ', ' VS', 'ZB', 'ZC', 'ZD', 'ZE', 'ZF', 'ZG', 'ZH', 'ZI', 'ZJ', 'ZN', 'ZO', ' ZQ']",['AAAA-ZZZZ']
-United States,general,"['US', 'USA']","['AA', 'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', ' K', ' N', ' W']","['1-99999','1A-9999Z','1AA-999ZZ']"
+United Kingdom,general,"['GB', 'GBR']","['2', 'G', 'M', 'VP', 'VQ', 'VS', 'ZB', 'ZC', 'ZD', 'ZE', 'ZF', 'ZG', 'ZH', 'ZI', 'ZJ', 'ZN', 'ZO', 'ZQ']",['AAAA-ZZZZ']
+United States,general,"['US', 'USA']","['AA', 'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', 'K', 'N', 'W']","['1-99999','1A-9999Z','1AA-999ZZ']"
 United States,commercial and private,"['US', 'USA']",['NC'],"['1-99999','1A-9999Z','1AA-999ZZ']"
 United States,gliders,"['US', 'USA']",['NG'],"['1-99999','1A-9999Z','1AA-999ZZ']"
 United States,limited,"['US', 'USA']",['NL'],"['1-99999','1A-9999Z','1AA-999ZZ']"
@@ -397,7 +397,7 @@ Uruguay,general,"['UY', 'URY']","['CV', 'CW', 'CX']",['AAA-ZZZ']
 Uzbekistan,general,"['UZ', 'UZB']","['UJ', 'UK', 'UL', 'UM']",['10000-99999']
 Vanuatu,general,"['VU', 'VUT']",['YJ'],['AA1-ZZ99']
 Vatican City,general,"['VA', 'VAT']",['HV'],['AAA-ZZZ']
-Venezuela,general,"['VE', 'VEN']","['YV', 'YW', 'YX', 'YY', ' 4M']","['1000-9999','100T-999T']"
+Venezuela,general,"['VE', 'VEN']","['YV', 'YW', 'YX', 'YY', '4M']","['1000-9999','100T-999T']"
 Venezuela,training,"['VE', 'VEN']","['YV', 'YW', 'YX', 'YY', '4M']",['100E-999E']
 Venezuela,official,"['VE', 'VEN']","['YV', 'YW', 'YX', 'YY', '4M']",['O100-O999']
 Vietnam,general,"['VN', 'VNM']","['XV', '3W']",['1000-9999']
diff --git a/flydenity/processed_itu_countries_regex.csv b/flydenity/processed_itu_countries_regex.csv
index 763836d..eaf4fda 100644
--- a/flydenity/processed_itu_countries_regex.csv
+++ b/flydenity/processed_itu_countries_regex.csv
@@ -20,42 +20,42 @@ Austria,amphibian and sea planes,"['AT', 'AUT']",['OE'],['WAA-WZZ'],"^(OE)(-{0,1
 Austria,helicopters,"['AT', 'AUT']",['OE'],['XAA-XZZ'],"^(OE)(-{0,1}(X[A-Z][A-Z])){0,1}$"
 Austria,gliders,"['AT', 'AUT']",['OE'],['0001-5999'],"^(OE)(-{0,1}([0-5][0-9][0-9][1-9])){0,1}$"
 Austria,moter gliders,"['AT', 'AUT']",['OE'],['9000-9999'],"^(OE)(-{0,1}(9[0-9][0-9][0-9])){0,1}$"
-Azerbaijan,general,"['AZ', 'AZE']","['4J','4K']","['AZ1-AZ999','10000-99999']","^(4J|4K)(-{0,1}(([A-Z]{2}[1-9][0-9]{0,2}|[1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
+Azerbaijan,general,"['AZ', 'AZE']","['4J', '4K']","['AZ1-AZ999', '10000-99999']","^(4J|4K)(-{0,1}(([A-Z]{2}[1-9][0-9]{0,2}|[1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Bahamas,general,"['BS', 'BHS']",['C6'],['AAA-ZZZ'],"^(C6)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Bahrain,general,"['BH', 'BHR']",['A9C'],"['AA-ZZ','AAA-ZZZ']","^(A9C)(-{0,1}(([A-Z][A-Z]|[A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Bahrain,general,"['BH', 'BHR']",['A9C'],"['AA-ZZ', 'AAA-ZZZ']","^(A9C)(-{0,1}(([A-Z][A-Z]|[A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Bangladesh,general,"['BD', 'BGD']","['S2', 'S3']",['AAA-ZZZ'],"^(S2|S3)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Barbados,general,"['BB', 'BRB']",['8P'],['AAA-ZZZ'],"^(8P)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Belarus,Soviet Union registrations,"['BY', 'BLR']","['EU', 'EV', 'EW']",['10000-99999'],"^(EU|EV|EW)(-{0,1}([1-9][0-9][0-9][0-9][0-9])){0,1}$"
 Belarus,general,"['BY', 'BLR']","['EU', 'EV', 'EW']",['100AA-999ZZ'],"^(EU|EV|EW)(-{0,1}(([1-9][0-9][0-9][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Belarus,Boeing 737,"['BY', 'BLR']","['EU', 'EV', 'EW']",['200PA-299PA'],"^(EU|EV|EW)(-{0,1}(2[0-9][0-9]PA)){0,1}$"
 Belarus,CRJ aircraft,"['BY', 'BLR']","['EU', 'EV', 'EW']",['100PJ-299PJ'],"^(EU|EV|EW)(-{0,1}([1-2][0-9][0-9]PJ)){0,1}$"
-Belarus,official use,"['BY', 'BLR']","['EU', 'EV', 'EW']","['001DA','001PA','001PB','85815']","^(EU|EV|EW)(-{0,1}(001DA|001PA|001PB|85815)){0,1}$"
+Belarus,official use,"['BY', 'BLR']","['EU', 'EV', 'EW']","['001DA', '001PA', '001PB', '85815']","^(EU|EV|EW)(-{0,1}(001DA|001PA|001PB|85815)){0,1}$"
 Belarus,balloons,"['BY', 'BLR']","['EU', 'EV', 'EW']",['0001L-9999L'],"^(EU|EV|EW)(-{0,1}([0-9][0-9][0-9][1-9]L)){0,1}$"
-Belgium,general,"['BE', 'BEL']","['ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT']","['AAA-PZZ','RAA-ZZZ']","^(ON|OO|OP|OQ|OR|OS|OT)(-{0,1}(([A-P][A-Z][A-Z]|[R-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Belgium,general,"['BE', 'BEL']","['ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT']","['AAA-PZZ', 'RAA-ZZZ']","^(ON|OO|OP|OQ|OR|OS|OT)(-{0,1}(([A-P][A-Z][A-Z]|[R-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Belgium,Belgian national airline Sabena,"['BE', 'BEL']","['ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT']",['SAA-SZZ'],"^(ON|OO|OP|OQ|OR|OS|OT)(-{0,1}(S[A-Z][A-Z])){0,1}$"
 Belgium,balloons,"['BE', 'BEL']","['ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT']",['BAA-BZZ'],"^(ON|OO|OP|OQ|OR|OS|OT)(-{0,1}(B[A-Z][A-Z])){0,1}$"
 Belgium,gliders,"['BE', 'BEL']","['ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT']",['YAA-ZAA'],"^(ON|OO|OP|OQ|OR|OS|OT)(-{0,1}([Y-Z]AA)){0,1}$"
 Belgium,home-built aircraft,"['BE', 'BEL']","['ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT']",['01-499'],"^(ON|OO|OP|OQ|OR|OS|OT)(-{0,1}([0-4][1-9][0-9]|[0-4][1-9])){0,1}$"
-Belgium,microlights,"['BE', 'BEL']","['ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT']","['501-999','A01-Z99']","^(ON|OO|OP|OQ|OR|OS|OT)(-{0,1}([5-9][0-9][1-9]|[A-Z][0-9][1-9])){0,1}$"
+Belgium,microlights,"['BE', 'BEL']","['ON', 'OO', 'OP', 'OQ', 'OR', 'OS', 'OT']","['501-999', 'A01-Z99']","^(ON|OO|OP|OQ|OR|OS|OT)(-{0,1}([5-9][0-9][1-9]|[A-Z][0-9][1-9])){0,1}$"
 Belize,general,"['BZ', 'BLZ']",['V3'],['AAA-ZZZ'],"^(V3)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Benin,general,"['BJ', 'BEN']",['TY'],['AAA-ZZZ'],"^(TY)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Bermuda,general,"['BM', 'BMU']","['VP-B','VQ-B','VR-B']",['AA-ZZ'],"^(VP-B|VQ-B|VR-B)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Bermuda,general,"['BM', 'BMU']","['VP-B', 'VQ-B', 'VR-B']",['AA-ZZ'],"^(VP-B|VQ-B|VR-B)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Bhutan,general,"['BT', 'BTN']",['A5'],['AAA-ZZZ'],"^(A5)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Bolivia,general,"['BO', 'BOL']",['CP'],['1000-9999'],"^(CP)(-{0,1}(([1-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Bosnia and Herzegovina,general,"['BA', 'BIH']",['E7'],['AAA-ZZZ'],"^(E7)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Botswana,general,"['BW', 'BWA']","['A2', '8O']",['AAA-ZZZ'],"^(A2|8O)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Brazil,microlights and experimental LSA aircraft,"['BR', 'BRA']",['PU'],['AAA-ZZZ'],"^(PU)(-{0,1}([A-Z][A-Z][A-Z])){0,1}$"
 Brazil,general,"['BR', 'BRA']","['PP', 'PQ', 'PS', 'PV', 'PW', 'PX', 'PY', 'ZV', 'ZW', 'ZX', 'ZY', 'ZZ']",['AAA-ZZZ'],"^(PP|PQ|PS|PV|PW|PX|PY|ZV|ZW|ZX|ZY|ZZ)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Brazil,general,"['BR', 'BRA']","['PR','PT']",['AAA-YZZ'],"^(PR|PT)(-{0,1}(([A-Y][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Brazil,general,"['BR', 'BRA']","['PR', 'PT']",['AAA-YZZ'],"^(PR|PT)(-{0,1}(([A-Y][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Brazil,experimental non-LSA aircraft,"['BR', 'BRA']","['PR', 'PT']",['ZAA-ZZZ'],"^(PR|PT)(-{0,1}(Z[A-Z][A-Z])){0,1}$"
 British Virgin Islands,general,"['VG', 'VGB']",['VP-L'],['AA-ZZ'],"^(VP-L)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Brunei,general,"['BN', 'BRN']",['V8'],"['AAA-ZZZ','AA1-ZZ9','001-999']","^(V8)(-{0,1}(([A-Z][A-Z][A-Z]|[A-Z][A-Z][1-9]|[0-9][0-9][1-9])|([A-Z0-9]{1,4}))){0,1}$"
+Brunei,general,"['BN', 'BRN']",['V8'],"['AAA-ZZZ', 'AA1-ZZ9', '001-999']","^(V8)(-{0,1}(([A-Z][A-Z][A-Z]|[A-Z][A-Z][1-9]|[0-9][0-9][1-9])|([A-Z0-9]{1,4}))){0,1}$"
 Bulgaria,general,"['BG', 'BGR']",['LZ'],['AAA-YZZ'],"^(LZ)(-{0,1}(([A-Y][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Burkina Faso,general,"['BF', 'BFA']",['XT'],['AAA-ZZZ'],"^(XT)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Burundi,general,"['BI', 'BDI']",['9U'],['AAA-ZZZ'],"^(9U)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Cambodia,general,"['KH', 'KHM']",['XU'],['AAA-ZZZ'],"^(XU)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Cameroon,general,"['CM', 'CMR']",['TJ'],['AAA-ZZZ'],"^(TJ)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Canada,general,"['CA', 'CAN']",['C'],"['FAAA-FZZZ','GAAA-GZZZ']","^(C)(-{0,1}((F[A-Z][A-Z][A-Z]|G[A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Canada,general,"['CA', 'CAN']",['C'],"['FAAA-FZZZ', 'GAAA-GZZZ']","^(C)(-{0,1}((F[A-Z][A-Z][A-Z]|G[A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Canada,ultralight aeroplanes,"['CA', 'CAN']",['C'],['IAAA-IZZZ'],"^(C)(-{0,1}(I[A-Z][A-Z][A-Z])){0,1}$"
 Canada,Newfoundland prior to merging with Canada in 1949,"['CA', 'CAN']",['VO'],['AAA-ZZZ'],"^(VO)(-{0,1}([A-Z][A-Z][A-Z])){0,1}$"
 Canada,general,"['CA', 'CAN']","['C', 'CF', 'CG', 'CH', 'CJ', 'CK', 'CY', 'CZ', 'VA', 'VB', 'VC', 'VD', 'VE', 'VF', 'VG', 'VX', 'VY', 'XJ', 'XK', 'XL', 'XM', 'XN', 'XO', 'VO']",['AAA-ZZZ'],"^(C|CF|CG|CH|CJ|CK|CY|CZ|VA|VB|VC|VD|VE|VF|VG|VX|VY|XJ|XK|XL|XM|XN|XO|VO)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
@@ -68,11 +68,11 @@ Chile,commercial aircraft,"['CL', 'CHL']",['CC'],['CAA-CZZ'],"^(CC)(-{0,1}(C[A-Z
 Chile,Chile's Aviation Directorate planes including those from the Aviation Museum,"['CL', 'CHL']",['CC'],['DAA-DZZ'],"^(CC)(-{0,1}(D[A-Z][A-Z])){0,1}$"
 Chile,government aircraft,"['CL', 'CHL']",['CC'],['EAA-EZZ'],"^(CC)(-{0,1}(E[A-Z][A-Z])){0,1}$"
 Chile,aero clubs northern zone,"['CL', 'CHL']",['CC'],['NAA-NZZ'],"^(CC)(-{0,1}(N[A-Z][A-Z])){0,1}$"
-Chile,aero clubs central zone,"['CL', 'CHL']",['CC'],"['KAA-KZZ','LAA-LZZ']","^(CC)(-{0,1}(K[A-Z][A-Z]|L[A-Z][A-Z])){0,1}$"
-Chile,aero clubs southern zone,"['CL', 'CHL']",['CC'],"['SAA-SZZ','TAA-TZZ']","^(CC)(-{0,1}(S[A-Z][A-Z]|T[A-Z][A-Z])){0,1}$"
+Chile,aero clubs central zone,"['CL', 'CHL']",['CC'],"['KAA-KZZ', 'LAA-LZZ']","^(CC)(-{0,1}(K[A-Z][A-Z]|L[A-Z][A-Z])){0,1}$"
+Chile,aero clubs southern zone,"['CL', 'CHL']",['CC'],"['SAA-SZZ', 'TAA-TZZ']","^(CC)(-{0,1}(S[A-Z][A-Z]|T[A-Z][A-Z])){0,1}$"
 Chile,aero clubs Patagonian area,"['CL', 'CHL']",['CC'],['MAA-MZZ'],"^(CC)(-{0,1}(M[A-Z][A-Z])){0,1}$"
 Chile,aero clubs private aircraft,"['CL', 'CHL']",['CC'],['PAA-PZZ'],"^(CC)(-{0,1}(P[A-Z][A-Z])){0,1}$"
-China,general,"['CN', 'CHN']","['B','XS', '3H', '3I', '3J', '3K', '3L', '3M', '3N', '3O', '3P', '3Q', '3R', '3S', '3T', '3U', 'VR', 'XX']","['0000-9999','000A-999Z', '00AA-99ZZ']","^(B|XS|3H|3I|3J|3K|3L|3M|3N|3O|3P|3Q|3R|3S|3T|3U|VR|XX)(-{0,1}(([0-9][0-9][0-9][0-9]|[0-9][0-9][0-9][A-Z]|[0-9][0-9][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+China,general,"['CN', 'CHN']","['B', 'XS', '3H', '3I', '3J', '3K', '3L', '3M', '3N', '3O', '3P', '3Q', '3R', '3S', '3T', '3U', 'VR', 'XX']","['0000-9999', '000A-999Z', '00AA-99ZZ']","^(B|XS|3H|3I|3J|3K|3L|3M|3N|3O|3P|3Q|3R|3S|3T|3U|VR|XX)(-{0,1}(([0-9][0-9][0-9][0-9]|[0-9][0-9][0-9][A-Z]|[0-9][0-9][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Colombia,microlights,"['CO', 'COL']",['HJ'],['1000A-9999Z'],"^(HJ)(-{0,1}([1-9][0-9][0-9][0-9][A-Z])){0,1}$"
 Colombia,general,"['CO', 'COL']","['HK', '5J', '5K']",['1000A-9999Z'],"^(HK|5J|5K)(-{0,1}(([1-9][0-9][0-9][0-9][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Comoros,general,"['KM', 'COM']",['D6'],['AAA-ZZZ'],"^(D6)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
@@ -109,7 +109,7 @@ Djibouti,general,"['DJ', 'DJI']",['J2'],['AAA-ZZZ'],"^(J2)(-{0,1}(([A-Z][A-Z][A-
 Dominica,general,"['DM', 'DMA']",['J7'],['AAA-ZZZ'],"^(J7)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Dominican Republic,general,"['DO', 'DOM']",['HI'],['100AA-999ZZ'],"^(HI)(-{0,1}(([1-9][0-9][0-9][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Ecuador,general,"['EC', 'ECU']","['HC', 'HD']",['AAA-ZZZ'],"^(HC|HD)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Egypt,general,"['EG', 'EGY']","['SSA', 'SSB', 'SSC', 'SSD', 'SSE', 'SSF', 'SSG', 'SSH', 'SSI', 'SSJ', 'SSK', 'SSL', 'SSM', 'SSM', 'SU', '6A', '6B']","['AAA-XXZ','ZAA-ZZZ']","^(SSA|SSB|SSC|SSD|SSE|SSF|SSG|SSH|SSI|SSJ|SSK|SSL|SSM|SSM|SU|6A|6B)(-{0,1}(([A-X][A-X][A-Z]|Z[A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Egypt,general,"['EG', 'EGY']","['SSA', 'SSB', 'SSC', 'SSD', 'SSE', 'SSF', 'SSG', 'SSH', 'SSI', 'SSJ', 'SSK', 'SSL', 'SSM', 'SSM', 'SU', '6A', '6B']","['AAA-XXZ', 'ZAA-ZZZ']","^(SSA|SSB|SSC|SSD|SSE|SSF|SSG|SSH|SSI|SSJ|SSK|SSL|SSM|SSM|SU|6A|6B)(-{0,1}(([A-X][A-X][A-Z]|Z[A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Egypt,gliders and balloons,"['EG', 'EGY']","['SSA', 'SSB', 'SSC', 'SSD', 'SSE', 'SSF', 'SSG', 'SSH', 'SSI', 'SSJ', 'SSK', 'SSL', 'SSM', 'SSM', 'SU', '6A', '6B']",['001-999'],"^(SSA|SSB|SSC|SSD|SSE|SSF|SSG|SSH|SSI|SSJ|SSK|SSL|SSM|SSM|SU|6A|6B)(-{0,1}([0-9][0-9][1-9])){0,1}$"
 El Salvador,general,"['SV', 'SLV']","['HU', 'YS']",['AAA-ZZZ'],"^(HU|YS)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Equatorial Guinea,general,"['GQ', 'GNQ']",['3C'],['AAA-ZZZ'],"^(3C)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
@@ -133,7 +133,7 @@ France,state owened,"['FR', 'FRA']","['F', 'HW', 'HX', 'HY', 'TH', 'TK', 'TM', '
 France,ultralights,"['FR', 'FRA']","['F', 'HW', 'HX', 'HY', 'TH', 'TK', 'TM', 'TO', 'TP', 'TQ', 'TV', 'TW', 'TX']","['00AA-99ZZ', '000AA-999ZZ', '00AAA-99ZZZ', '000AAA-999ZZZ', '69MAA-69MZZ', '69MAAA-69MZZZ']","^(F|HW|HX|HY|TH|TK|TM|TO|TP|TQ|TV|TW|TX)(-{0,1}([0-9][0-9][A-Z][A-Z]|[0-9][0-9][0-9][A-Z][A-Z]|[0-9][0-9][A-Z][A-Z][A-Z]|[0-9][0-9][0-9][A-Z][A-Z][A-Z]|69M[A-Z][A-Z]|69M[A-Z][A-Z][A-Z])){0,1}$"
 Gabon,general,"['GA', 'GAB']",['TR'],['AAA-ZZZ'],"^(TR)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Gambia,general,"['GM', 'GMB']",['C5'],['AAA-ZZZ'],"^(C5)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Georgia,general,"['GE', 'GEO']",['4L'],"['AAA-ZZZ','10000-99999']","^(4L)(-{0,1}(([A-Z][A-Z][A-Z]|[1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
+Georgia,general,"['GE', 'GEO']",['4L'],"['AAA-ZZZ', '10000-99999']","^(4L)(-{0,1}(([A-Z][A-Z][A-Z]|[1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Germany,general,"['DE', 'DEU']","['D', 'DA', 'DB', 'DC', 'DD', 'DE', 'DF', 'DG', 'DH', 'DI', 'DJ', 'DK', 'DL', 'DM', 'DN', 'DO', 'DP', 'DR', 'Y2', 'Y3', 'Y4', 'Y5', 'Y6', 'Y7', 'Y8', 'Y9']",['AAA-ZZZ'],"^(D|DA|DB|DC|DD|DE|DF|DG|DH|DI|DJ|DK|DL|DM|DN|DO|DP|DR|Y2|Y3|Y4|Y5|Y6|Y7|Y8|Y9)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Germany,heavy > 20 t MTOW,"['DE', 'DEU']",['D'],['AAAA-AZZZ'],"^(D)(-{0,1}(A[A-Z][A-Z][A-Z])){0,1}$"
 Germany,test registrations,"['DE', 'DEU']",['D'],['AUAA-AZZZ'],"^(D)(-{0,1}(A[U-Z][A-Z][A-Z])){0,1}$"
@@ -171,40 +171,40 @@ Iceland,microlights,"['IS', 'ISL']",['TF'],['100-999'],"^(TF)(-{0,1}([1-9][0-9][
 India,general,"['IN', 'IND']","['AT', 'AU', 'AV', 'AW', 'VT', 'VU', 'VV', 'VW', '8T', '8U', '8V', '8W', '8X', '8Y']",['AAA-ZZZ'],"^(AT|AU|AV|AW|VT|VU|VV|VW|8T|8U|8V|8W|8X|8Y)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Indonesia,general,"['ID', 'IDN']","['JZ', 'PK', 'PL', 'PM', 'PN', 'PO', 'YB', 'YC', 'YD', 'YE', 'YF', 'YG', 'YH', '7A', '7B', '7C', '7D', '7E', '7F', '7G', '7H', '7I', '8A', '8B', '8C', '8D', '8E', '8F', '8G', '8H', '8I']",['AAA-ZZZ'],"^(JZ|PK|PL|PM|PN|PO|YB|YC|YD|YE|YF|YG|YH|7A|7B|7C|7D|7E|7F|7G|7H|7I|8A|8B|8C|8D|8E|8F|8G|8H|8I)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Iran,general,"['IR', 'IRN']","['EP', 'EQ', '9B', '9C', '9D']",['AAA-ZZZ'],"^(EP|EQ|9B|9C|9D)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Iraq,general,"['IQ', 'IRQ']","['HN', ' YI']",['AAA-ZZZ'],"^(HN|YI)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Iraq,general,"['IQ', 'IRQ']","['HN', 'YI']",['AAA-ZZZ'],"^(HN|YI)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Ireland,general,"['IE', 'IRL']","['EI', 'EJ']",['AAA-ZZZ'],"^(EI|EJ)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Ireland,VIP or business,"['IE', 'IRL']","['EI', 'EJ']",['AAAA-ZZZZ'],"^(EI|EJ)(-{0,1}([A-Z][A-Z][A-Z][A-Z])){0,1}$"
 Isle of Man,general,"['IM', 'IMN']",['M'],['AAAA-ZZZZ'],"^(M)(-{0,1}(([A-Z][A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Israel,general,"['IL', 'ISR']","['4X', ' 4Z']",['AAA-ZZZ'],"^(4X|4Z)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Italy,general,"['IT', 'ITA']",['I'],"['AAAA-ZZZZ','0001-Z999']","^(I)(-{0,1}(([A-Z][A-Z][A-Z][A-Z]|[0-Z][0-9][0-9][1-9])|([A-Z0-9]{1,4}))){0,1}$"
+Israel,general,"['IL', 'ISR']","['4X', '4Z']",['AAA-ZZZ'],"^(4X|4Z)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Italy,general,"['IT', 'ITA']",['I'],"['AAAA-ZZZZ', '0001-Z999']","^(I)(-{0,1}(([A-Z][A-Z][A-Z][A-Z]|[0-Z][0-9][0-9][1-9])|([A-Z0-9]{1,4}))){0,1}$"
 Ivory Coast or Cote d'Ivoire,general,"['CI', 'CIV']",['TU'],['AAA-ZZZ'],"^(TU)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Jamaica,general,"['JM', 'JAM']",['6Y'],['AAA-ZZZ'],"^(6Y)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Japan,general,"['JP', 'JPN']","['JA', 'JB', 'JC', 'JD', 'JE', 'JF', 'JG', 'JH', 'JI', 'JJ', 'JK', 'JL', 'JM', 'JN', 'JO', 'JP', 'JQ', 'JR', 'JS', '7J', '7K', '7L', '7M', '7N', '8J', '8K', '8L', '8M', '8N']","['0001-9999','001A-999Z','01AA-99ZZ']","^(JA|JB|JC|JD|JE|JF|JG|JH|JI|JJ|JK|JL|JM|JN|JO|JP|JQ|JR|JS|7J|7K|7L|7M|7N|8J|8K|8L|8M|8N)(-{0,1}(([0-9][0-9][0-9][1-9]|[0-9][0-9][1-9][A-Z]|[0-9][1-9][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Japan,general,"['JP', 'JPN']","['JA', 'JB', 'JC', 'JD', 'JE', 'JF', 'JG', 'JH', 'JI', 'JJ', 'JK', 'JL', 'JM', 'JN', 'JO', 'JP', 'JQ', 'JR', 'JS', '7J', '7K', '7L', '7M', '7N', '8J', '8K', '8L', '8M', '8N']","['0001-9999', '001A-999Z', '01AA-99ZZ']","^(JA|JB|JC|JD|JE|JF|JG|JH|JI|JJ|JK|JL|JM|JN|JO|JP|JQ|JR|JS|7J|7K|7L|7M|7N|8J|8K|8L|8M|8N)(-{0,1}(([0-9][0-9][0-9][1-9]|[0-9][0-9][1-9][A-Z]|[0-9][1-9][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Japan,balloons,"['JP', 'JPN']","['JA', 'JB', 'JC', 'JD', 'JE', 'JF', 'JG', 'JH', 'JI', 'JJ', 'JK', 'JL', 'JM', 'JN', 'JO', 'JP', 'JQ', 'JR', 'JS', '7J', '7K', '7L', '7M', '7N', '8J', '8K', '8L', '8M', '8N']",['A001-A999'],"^(JA|JB|JC|JD|JE|JF|JG|JH|JI|JJ|JK|JL|JM|JN|JO|JP|JQ|JR|JS|7J|7K|7L|7M|7N|8J|8K|8L|8M|8N)(-{0,1}(A[0-9][0-9][1-9])){0,1}$"
 Jordan,general,"['JO', 'JOR']",['JY'],['AAA-ZZZ'],"^(JY)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Kazakhstan,general,"['KZ', 'KAZ']","['UN', 'UO', 'UP', 'UQ']",['AAA01-ZZZ99'],"^(UN|UO|UP|UQ)(-{0,1}(([A-Z][A-Z][A-Z][0-9][1-9])|([A-Z0-9]{1,4}))){0,1}$"
 Kenya,general,"['KE', 'KEN']","['5Y', '5Z']",['AAA-ZZZ'],"^(5Y|5Z)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Kiribati,general,"['KI', 'KIR']",['T3'],['AAA-ZZZ'],"^(T3)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 North Korea,general,"['KP', 'PRK']","['HM', 'P5', 'P6', 'P7', 'P8', 'P9']",['500-999'],"^(HM|P5|P6|P7|P8|P9)(-{0,1}(([5-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
-South Korea,ultralights,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['C000-C999'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(C[0-9][0-9][0-9])){0,1}$"
-South Korea,gliders,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['0000-0599'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(0[0-5][0-9][0-9])){0,1}$"
-South Korea,airships,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['0600-0799'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(0[6-7][0-9][0-9])){0,1}$"
-South Korea,piston engines,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']","['1000-1799','2000-2099']","^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(1[0-7][0-9][0-9]|20[0-9][0-9])){0,1}$"
-South Korea,turboprops,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['5100-5499'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(5[1-4][0-9][0-9])){0,1}$"
-South Korea,piston engine helicopters,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['6100-6199'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(61[0-9][0-9])){0,1}$"
-South Korea,single turbojets,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['7100-7199'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(71[0-9][0-9])){0,1}$"
-South Korea,twin-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']","['7200-7299', '7500-7599', '7700-7799', '7800-7899', '8000-8099', '8200-8299']","^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(72[0-9][0-9]|75[0-9][0-9]|77[0-9][0-9]|78[0-9][0-9]|80[0-9][0-9]|82[0-9][0-9])){0,1}$"
-South Korea,tri-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['7300-7399'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(73[0-9][0-9])){0,1}$"
-South Korea,quad-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']","['7400-7499', '7600-7699', '8400-8499', '8600-8699']","^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(74[0-9][0-9]|76[0-9][0-9]|84[0-9][0-9]|86[0-9][0-9])){0,1}$"
-South Korea,turboshaft helicopters,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', ' HL', '6K', '6L', '6M', '6N']",['9100-9699'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(9[1-6][0-9][0-9])){0,1}$"
+South Korea,ultralights,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['C000-C999'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(C[0-9][0-9][0-9])){0,1}$"
+South Korea,gliders,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['0000-0599'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(0[0-5][0-9][0-9])){0,1}$"
+South Korea,airships,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['0600-0799'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(0[6-7][0-9][0-9])){0,1}$"
+South Korea,piston engines,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']","['1000-1799', '2000-2099']","^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(1[0-7][0-9][0-9]|20[0-9][0-9])){0,1}$"
+South Korea,turboprops,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['5100-5499'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(5[1-4][0-9][0-9])){0,1}$"
+South Korea,piston engine helicopters,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['6100-6199'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(61[0-9][0-9])){0,1}$"
+South Korea,single turbojets,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['7100-7199'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(71[0-9][0-9])){0,1}$"
+South Korea,twin-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']","['7200-7299', '7500-7599', '7700-7799', '7800-7899', '8000-8099', '8200-8299']","^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(72[0-9][0-9]|75[0-9][0-9]|77[0-9][0-9]|78[0-9][0-9]|80[0-9][0-9]|82[0-9][0-9])){0,1}$"
+South Korea,tri-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['7300-7399'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(73[0-9][0-9])){0,1}$"
+South Korea,quad-jet aircrafts,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']","['7400-7499', '7600-7699', '8400-8499', '8600-8699']","^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(74[0-9][0-9]|76[0-9][0-9]|84[0-9][0-9]|86[0-9][0-9])){0,1}$"
+South Korea,turboshaft helicopters,"['KR', 'KOR']","['DS', 'DT', 'D7', 'D8', 'D9', 'HL', '6K', '6L', '6M', '6N']",['9100-9699'],"^(DS|DT|D7|D8|D9|HL|6K|6L|6M|6N)(-{0,1}(9[1-6][0-9][0-9])){0,1}$"
 Kosovo,general,"['XK', 'XKX']",['Z6'],['AAA-ZZZ'],"^(Z6)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Kuwait,general,"['KW', 'KWT']",['9K'],['AAA-ZZZ'],"^(9K)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Kyrgyzstan,general,"['KG', 'KGZ']",['EX'],"['100-999','10000-99999']","^(EX)(-{0,1}(([1-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
-Laos,general,"['LA', 'LAO']","['XW','RDPL']",['10000-99999'],"^(XW|RDPL)(-{0,1}(([1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
+Kyrgyzstan,general,"['KG', 'KGZ']",['EX'],"['100-999', '10000-99999']","^(EX)(-{0,1}(([1-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
+Laos,general,"['LA', 'LAO']","['XW', 'RDPL']",['10000-99999'],"^(XW|RDPL)(-{0,1}(([1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Latvia,general,"['LV', 'LVA']",['YL'],['AAA-ZZZ'],"^(YL)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Lebanon,general,"['LB', 'LBN']",['OD'],['AAA-ZZZ'],"^(OD)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Lesotho,general,"['LS', 'LSO']",['7P'],['AAA-ZZZ'],"^(7P)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Liberia,general,"['LR', 'LBR']","['A8', ' D5', ' EL', '5L', '5M', ' 6Z']",['AAA-ZZZ'],"^(A8|D5|EL|5L|5M|6Z)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Liberia,general,"['LR', 'LBR']","['A8', 'D5', 'EL', '5L', '5M', '6Z']",['AAA-ZZZ'],"^(A8|D5|EL|5L|5M|6Z)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Libya,general,"['LY', 'LBY']",['5A'],['AAA-ZZZ'],"^(5A)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Liechtenstein,general,"['LI', 'LIE']","['HB', 'HB0', 'HB3Y', 'HBL']",['AAA-ZZZ'],"^(HB|HB0|HB3Y|HBL)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Lithuania,general,"['LT', 'LTU']",['LY'],['AAA-ZZZ'],"^(LY)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
@@ -218,11 +218,11 @@ Macedonia,general,"['MK', 'MKD']",['Z3'],['AAA-ZZZ'],"^(Z3)(-{0,1}(([A-Z][A-Z][A
 Macedonia,helicopters,"['MK', 'MKD']",['Z3'],['HAA-HZZ'],"^(Z3)(-{0,1}(H[A-Z][A-Z])){0,1}$"
 Macedonia,ultralights,"['MK', 'MKD']",['Z3'],['UA-001-UA-999'],"^(Z3)(-{0,1}(MANUAL)){0,1}$"
 Macedonia,balloons,"['MK', 'MKD']",['Z3'],['OAA-OZZ'],"^(Z3)(-{0,1}(O[A-Z][A-Z])){0,1}$"
-Madagascar,general,"['MG', 'MDG']","['5R', '5S', ' 6X']",['AAA-ZZZ'],"^(5R|5S|6X)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Madagascar,general,"['MG', 'MDG']","['5R', '5S', '6X']",['AAA-ZZZ'],"^(5R|5S|6X)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Malawi,general,"['MW', 'MWI']",['7Q'],['AAA-ZZZ'],"^(7Q)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Malaysia,general,"['MY', 'MYS']","['9M', ' 9W']",['AAA-ZZZ'],"^(9M|9W)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Malaysia,amateur-builts,"['MY', 'MYS']","['9M', ' 9W']",['EAA-EZZ'],"^(9M|9W)(-{0,1}(E[A-Z][A-Z])){0,1}$"
-Malaysia,ultralights,"['MY', 'MYS']","['9M', ' 9W']",['UAA-UZZ'],"^(9M|9W)(-{0,1}(U[A-Z][A-Z])){0,1}$"
+Malaysia,general,"['MY', 'MYS']","['9M', '9W']",['AAA-ZZZ'],"^(9M|9W)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Malaysia,amateur-builts,"['MY', 'MYS']","['9M', '9W']",['EAA-EZZ'],"^(9M|9W)(-{0,1}(E[A-Z][A-Z])){0,1}$"
+Malaysia,ultralights,"['MY', 'MYS']","['9M', '9W']",['UAA-UZZ'],"^(9M|9W)(-{0,1}(U[A-Z][A-Z])){0,1}$"
 Maldives,general,"['MV', 'MDV']",['8Q'],['AAA-ZZZ'],"^(8Q)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Mali,general,"['ML', 'MLI']",['TZ'],['AAA-ZZZ'],"^(TZ)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Malta,general,"['MT', 'MLT']",['9H'],['AAA-ZZZ'],"^(9H)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
@@ -234,7 +234,7 @@ Mexico,commercial,"['MX', 'MEX']",['XA'],['AAA-ZZZ'],"^(XA)(-{0,1}([A-Z][A-Z][A-
 Mexico,private,"['MX', 'MEX']",['XB'],['AAA-ZZZ'],"^(XB)(-{0,1}([A-Z][A-Z][A-Z])){0,1}$"
 Mexico,government,"['MX', 'MEX']",['XC'],['AAA-ZZZ'],"^(XC)(-{0,1}([A-Z][A-Z][A-Z])){0,1}$"
 Micronesia,general,"['FM', 'FSM']",['V6'],['AAA-ZZZ'],"^(V6)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Moldova,general,"['MD', 'MDA']",['ER'],"['AAA-ZZZ','10000-99999']","^(ER)(-{0,1}(([A-Z][A-Z][A-Z]|[1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
+Moldova,general,"['MD', 'MDA']",['ER'],"['AAA-ZZZ', '10000-99999']","^(ER)(-{0,1}(([A-Z][A-Z][A-Z]|[1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Monaco,general,"['MC', 'MCO']",['3A'],['MAA-MZZ'],"^(3A)(-{0,1}((M[A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Mongolia,general,"['MN', 'MNG']","['JT', 'JU', 'JV']",['1000-9999'],"^(JT|JU|JV)(-{0,1}(([1-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Montenegro,general,"['ME', 'MNE']",['4O'],['AAA-ZZZ'],"^(4O)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
@@ -252,16 +252,16 @@ Netherlands,microlights,"['NL', 'NLD']",['PH'],['1A1-9Z9'],"^(PH)(-{0,1}([1-9][A
 Netherlands,gliders,"['NL', 'NLD']",['PH'],['100-9999'],"^(PH)(-{0,1}([1-9][0-9][0-9]{1,2})){0,1}$"
 Netherlands Antilles or Curacao,general,"['AN', 'ANT']",['PJ'],['AAA-ZZZ'],"^(PJ)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 New Zealand,general,"['NZ', 'NZL']","['ZK', 'ZL', 'ZM']",['***'],"^(ZK|ZL|ZM)(-{0,1}(([A-Z0-9][A-Z0-9][A-Z0-9])|([A-Z0-9]{1,4}))){0,1}$"
-New Zealand,historical,"['NZ', 'NZL']",['ZK'],"['A**','B**','G**','HA*']","^(ZK)(-{0,1}(A|[A-Z0-9]|[A-Z0-9]|B|[A-Z0-9]|[A-Z0-9]|G|[A-Z0-9]|[A-Z0-9]|HA[A-Z0-9])){0,1}$"
-New Zealand,balloons,"['NZ', 'NZL']",['ZK'],"['FA*','FB*']","^(ZK)(-{0,1}(F|A|[A-Z0-9]|FB[A-Z0-9])){0,1}$"
+New Zealand,historical,"['NZ', 'NZL']",['ZK'],"['A**', 'B**', 'G**', 'HA*']","^(ZK)(-{0,1}(A|[A-Z0-9]|[A-Z0-9]|B|[A-Z0-9]|[A-Z0-9]|G|[A-Z0-9]|[A-Z0-9]|HA[A-Z0-9])){0,1}$"
+New Zealand,balloons,"['NZ', 'NZL']",['ZK'],"['FA*', 'FB*']","^(ZK)(-{0,1}(F|A|[A-Z0-9]|FB[A-Z0-9])){0,1}$"
 New Zealand,gliders,"['NZ', 'NZL']",['ZK'],['G**'],"^(ZK)(-{0,1}(G[A-Z0-9][A-Z0-9])){0,1}$"
-New Zealand,helicopters,"['NZ', 'NZL']",['ZK'],"['H**','I**']","^(ZK)(-{0,1}(H|[A-Z0-9]|[A-Z0-9]|I[A-Z0-9][A-Z0-9])){0,1}$"
-New Zealand,gyrocopters,"['NZ', 'NZL']",['ZK'],"['R**','RB*','RC*','RD*']","^(ZK)(-{0,1}(R|[A-Z0-9]|[A-Z0-9]|R|B|[A-Z0-9]|R|C|[A-Z0-9]|RD[A-Z0-9])){0,1}$"
+New Zealand,helicopters,"['NZ', 'NZL']",['ZK'],"['H**', 'I**']","^(ZK)(-{0,1}(H|[A-Z0-9]|[A-Z0-9]|I[A-Z0-9][A-Z0-9])){0,1}$"
+New Zealand,gyrocopters,"['NZ', 'NZL']",['ZK'],"['R**', 'RB*', 'RC*', 'RD*']","^(ZK)(-{0,1}(R|[A-Z0-9]|[A-Z0-9]|R|B|[A-Z0-9]|R|C|[A-Z0-9]|RD[A-Z0-9])){0,1}$"
 New Zealand,ICAO prohibited,"['NZ', 'NZL']",['ZK'],['Q**'],"^(ZK)(-{0,1}(Q[A-Z0-9][A-Z0-9])){0,1}$"
-Nicaragua,general,"['NI', 'NIC']","['HT', 'H6', 'H7', ' YN']",['AAA-ZZZ'],"^(HT|H6|H7|YN)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Nicaragua,general,"['NI', 'NIC']","['HT', 'H6', 'H7', 'YN']",['AAA-ZZZ'],"^(HT|H6|H7|YN)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Niger,general,"['NE', 'NER']",['5U'],['AAA-ZZZ'],"^(5U)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Nigeria,general,"['NG', 'NGA']","['5N', '5O']",['AAA-ZZZ'],"^(5N|5O)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Norway,general,"['NO', 'NOR']","['JW', 'JX', 'LA', 'LB', 'LC', 'LD', 'LE', 'LF', 'LG', 'LH', 'LI', 'LJ', 'LK', 'LL', 'LM', 'LN', ' 3Y']",['AAA-ZZZ'],"^(JW|JX|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|3Y)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Norway,general,"['NO', 'NOR']","['JW', 'JX', 'LA', 'LB', 'LC', 'LD', 'LE', 'LF', 'LG', 'LH', 'LI', 'LJ', 'LK', 'LL', 'LM', 'LN', '3Y']",['AAA-ZZZ'],"^(JW|JX|LA|LB|LC|LD|LE|LF|LG|LH|LI|LJ|LK|LL|LM|LN|3Y)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Norway,gliders,"['NO', 'NOR']",['LN'],['GAA-GZZ'],"^(LN)(-{0,1}(G[A-Z][A-Z])){0,1}$"
 Norway,helicopters,"['NO', 'NOR']",['LN'],['OAA-OZZ'],"^(LN)(-{0,1}(O[A-Z][A-Z])){0,1}$"
 Norway,balloons,"['NO', 'NOR']",['LN'],['CAA-CZZ'],"^(LN)(-{0,1}(C[A-Z][A-Z])){0,1}$"
@@ -271,10 +271,10 @@ Pakistan,general,"['PK', 'PAK']","['AP', 'AQ', 'AR', 'AS', '6P', '6Q', '6R', '6S
 Palau,general,"['PW', 'PLW']",['T8'],['AAA-ZZZ'],"^(T8)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Palestinian Authority,general,"['PS', 'PSE']",['E4'],['AAA-ZZZ'],"^(E4)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Palestinian Authority,general,"['PS', 'PSE']",['SU-Y'],['AA-ZZ'],"^(SU-Y)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Panama,general,"['PA', 'PAN']","['HO', 'HP', ' H3', 'H8', 'H9', '3E', '3F']",['AAA-ZZZ'],"^(HO|HP|H3|H8|H9|3E|3F)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Panama,general,"['PA', 'PAN']","['HO', 'HP', 'H3', 'H8', 'H9', '3E', '3F']",['AAA-ZZZ'],"^(HO|HP|H3|H8|H9|3E|3F)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Papua New Guinea,general,"['PG', 'PNG']",['P2'],['AAA-ZZZ'],"^(P2)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Paraguay,general,"['PY', 'PRY']",['ZP'],['AAA-ZZZ'],"^(ZP)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Peru,general,"['PE', 'PER']","['OA', 'OB', 'OC', ' 4T']",['1000-9999'],"^(OA|OB|OC|4T)(-{0,1}(([1-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
+Peru,general,"['PE', 'PER']","['OA', 'OB', 'OC', '4T']",['1000-9999'],"^(OA|OB|OC|4T)(-{0,1}(([1-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Philippines,general,"['PH', 'PHL']","['RP', 'DU', 'DV', 'DW', 'DX', 'DY', 'DZ', '4D', '4E', '4F', '4G', '4H', '4I']",['AAA-ZZZ'],"^(RP|DU|DV|DW|DX|DY|DZ|4D|4E|4F|4G|4H|4I)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Philippines,government,"['PH', 'PHL']",['RP'],['0001-9999'],"^(RP)(-{0,1}([0-9][0-9][0-9][1-9])){0,1}$"
 Philippines,registered aircraft,"['PH', 'PHL']",['RP'],['C0001-C9999'],"^(RP)(-{0,1}(C[0-9][0-9][0-9][1-9])){0,1}$"
@@ -282,16 +282,16 @@ Philippines,gliders,"['PH', 'PHL']",['RP'],['G0001-G9999'],"^(RP)(-{0,1}(G[0-9][
 Philippines,limited,"['PH', 'PHL']",['RP'],['R0001-R9999'],"^(RP)(-{0,1}(R[0-9][0-9][0-9][1-9])){0,1}$"
 Philippines,unmanned,"['PH', 'PHL']",['RP'],['U001A-U999Z'],"^(RP)(-{0,1}(U[0-9][0-9][1-9][A-Z])){0,1}$"
 Philippines,experimental,"['PH', 'PHL']",['RP'],['X0001-X9999'],"^(RP)(-{0,1}(X[0-9][0-9][0-9][1-9])){0,1}$"
-Poland,general,"['PL', 'POL']","['HF', 'SN', 'SO', 'SP', 'SQ', 'SR', ' 3Z']",['AAA-ZZZ'],"^(HF|SN|SO|SP|SQ|SR|3Z)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Poland,general,"['PL', 'POL']","['HF', 'SN', 'SO', 'SP', 'SQ', 'SR', '3Z']",['AAA-ZZZ'],"^(HF|SN|SO|SP|SQ|SR|3Z)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Poland,motor-gliders,"['PL', 'POL']",['SP'],['0***'],"^(SP)(-{0,1}(0[A-Z0-9][A-Z0-9][A-Z0-9])){0,1}$"
-Poland,gliders,"['PL', 'POL']",['SP'],"['1***-3***','8***']","^(SP)(-{0,1}([1-3][A-Z0-9][A-Z0-9][A-Z0-9]|8[A-Z0-9][A-Z0-9][A-Z0-9])){0,1}$"
+Poland,gliders,"['PL', 'POL']",['SP'],"['1***-3***', '8***']","^(SP)(-{0,1}([1-3][A-Z0-9][A-Z0-9][A-Z0-9]|8[A-Z0-9][A-Z0-9][A-Z0-9])){0,1}$"
 Poland,balloons,"['PL', 'POL']",['SP'],['B**'],"^(SP)(-{0,1}(B[A-Z0-9][A-Z0-9])){0,1}$"
 Poland,Polish airlines,"['PL', 'POL']",['SP'],['L**'],"^(SP)(-{0,1}(L[A-Z0-9][A-Z0-9])){0,1}$"
 Poland,ultralights,"['PL', 'POL']",['SP'],['S***'],"^(SP)(-{0,1}(S[A-Z0-9][A-Z0-9][A-Z0-9])){0,1}$"
 Poland,autogyros,"['PL', 'POL']",['SP'],['X***'],"^(SP)(-{0,1}(X[A-Z0-9][A-Z0-9][A-Z0-9])){0,1}$"
 Poland,experimental,"['PL', 'POL']",['SP'],['Y**'],"^(SP)(-{0,1}(Y[A-Z0-9][A-Z0-9])){0,1}$"
-Poland,police,"['PL', 'POL']",['SN'],"['**XP','VP*']","^(SN)(-{0,1}([A-Z0-9]|[A-Z0-9]|X|P|VP[A-Z0-9])){0,1}$"
-Poland,border guard,"['PL', 'POL']",['SN'],"['**YG','VS*']","^(SN)(-{0,1}([A-Z0-9]|[A-Z0-9]|Y|G|VS[A-Z0-9])){0,1}$"
+Poland,police,"['PL', 'POL']",['SN'],"['**XP', 'VP*']","^(SN)(-{0,1}([A-Z0-9]|[A-Z0-9]|X|P|VP[A-Z0-9])){0,1}$"
+Poland,border guard,"['PL', 'POL']",['SN'],"['**YG', 'VS*']","^(SN)(-{0,1}([A-Z0-9]|[A-Z0-9]|Y|G|VS[A-Z0-9])){0,1}$"
 Portugal,general,"['PT', 'PRT']","['CQ', 'CR', 'CS', 'CT', 'CU']",['AAA-ZZZ'],"^(CQ|CR|CS|CT|CU)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Portugal,airlines,"['PT', 'PRT']",['CS'],['T**'],"^(CS)(-{0,1}(T[A-Z0-9][A-Z0-9])){0,1}$"
 Portugal,helicopters,"['PT', 'PRT']",['CS'],['H**'],"^(CS)(-{0,1}(H[A-Z0-9][A-Z0-9])){0,1}$"
@@ -300,12 +300,12 @@ Portugal,ultralights,"['PT', 'PRT']",['CS'],['U**'],"^(CS)(-{0,1}(U[A-Z0-9][A-Z0
 Portugal,gliders,"['PT', 'PRT']",['CS'],['P**'],"^(CS)(-{0,1}(P[A-Z0-9][A-Z0-9])){0,1}$"
 Portugal,balloons,"['PT', 'PRT']",['CS'],['B**'],"^(CS)(-{0,1}(B[A-Z0-9][A-Z0-9])){0,1}$"
 Qatar,general,"['QA', 'QAT']",['A7'],['AAA-ZZZ'],"^(A7)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Qatar,official,"['QA', 'QAT']",['A7'],"['HAA-HZZ','MAA-MZZ']","^(A7)(-{0,1}(H[A-Z][A-Z]|M[A-Z][A-Z])){0,1}$"
+Qatar,official,"['QA', 'QAT']",['A7'],"['HAA-HZZ', 'MAA-MZZ']","^(A7)(-{0,1}(H[A-Z][A-Z]|M[A-Z][A-Z])){0,1}$"
 Reunion Island,general,"['RE', 'REU']",['F-OD'],['AA-ZZ'],"^(F-OD)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Romania,general,"['RO', 'ROU']","['YO', 'YP', 'YQ', 'YR']",['AAA-ZZZ'],"^(YO|YP|YQ|YR)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Romania,gliders and ultralights,"['RO', 'ROU']",['YR'],['AAA-ZZZ'],"^(YR)(-{0,1}([A-Z][A-Z][A-Z])){0,1}$"
 Romania,drones,"['RO', 'ROU']",['YR'],['D0000-D9999'],"^(YR)(-{0,1}(D[0-9][0-9][0-9][0-9])){0,1}$"
-Russia,general,"['RU', 'RUS']","['R','RA','RF','UA', 'UB', 'UC', 'UD', 'UE', 'UF', 'UG', 'UH', 'UI']","['00001-99999','0001K-9999K','0001G-9999G','0001A-9999A']","^(R|RA|RF|UA|UB|UC|UD|UE|UF|UG|UH|UI)(-{0,1}(([0-9][0-9][0-9][0-9][1-9]|[0-9][0-9][0-9][1-9]K|[0-9][0-9][0-9][1-9]G|[0-9][0-9][0-9][1-9]A)|([A-Z0-9]{1,4}))){0,1}$"
+Russia,general,"['RU', 'RUS']","['R', 'RA', 'RF', 'UA', 'UB', 'UC', 'UD', 'UE', 'UF', 'UG', 'UH', 'UI']","['00001-99999', '0001K-9999K', '0001G-9999G', '0001A-9999A']","^(R|RA|RF|UA|UB|UC|UD|UE|UF|UG|UH|UI)(-{0,1}(([0-9][0-9][0-9][0-9][1-9]|[0-9][0-9][0-9][1-9]K|[0-9][0-9][0-9][1-9]G|[0-9][0-9][0-9][1-9]A)|([A-Z0-9]{1,4}))){0,1}$"
 Rwanda,general,"['RW', 'RWA']",['9XR'],['AA-ZZ'],"^(9XR)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Saint Helena,general,"['SH', 'SHN']",['VQ-H'],['AA-ZZ'],"^(VQ-H)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Saint Kitts and Nevis,general,"['KN', 'KNA']",['V4'],['AAA-ZZZ'],"^(V4)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
@@ -315,7 +315,7 @@ Samoa,general,"['WS', 'WSM']",['5W'],['AAA-ZZZ'],"^(5W)(-{0,1}(([A-Z][A-Z][A-Z])
 San Marino,general,"['SM', 'SMR']",['T7'],['AAA-ZZZ'],"^(T7)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 San Marino,microlights,"['SM', 'SMR']",['T7'],['001-999'],"^(T7)(-{0,1}([0-9][0-9][1-9])){0,1}$"
 Sao Tome and Principe,general,"['ST', 'STP']",['S9'],['AAA-ZZZ'],"^(S9)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Saudi Arabia,general,"['SA', 'SAU']","['HZ', '7Z', '8Z']","['AAA-ZZZ','AA1-ZZ99','AAA1-ZZZ99','AAAA-ZZZZ']","^(HZ|7Z|8Z)(-{0,1}(([A-Z][A-Z][A-Z]|[A-Z]{2}[1-9][0-9]{0,1}|[A-Z]{3}[1-9][0-9]{0,1}|[A-Z][A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Saudi Arabia,general,"['SA', 'SAU']","['HZ', '7Z', '8Z']","['AAA-ZZZ', 'AA1-ZZ99', 'AAA1-ZZZ99', 'AAAA-ZZZZ']","^(HZ|7Z|8Z)(-{0,1}(([A-Z][A-Z][A-Z]|[A-Z]{2}[1-9][0-9]{0,1}|[A-Z]{3}[1-9][0-9]{0,1}|[A-Z][A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Senegal,general,"['SN', 'SEN']","['6V', '6W']",['AAA-ZZZ'],"^(6V|6W)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Serbia,general,"['RS', 'SRB']","['YT', 'YU']",['AAA-ZZZ'],"^(YT|YU)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Serbia,gliders,"['RS', 'SRB']","['YT', 'YU']",['0000-9999'],"^(YT|YU)(-{0,1}([0-9][0-9][0-9][0-9])){0,1}$"
@@ -323,12 +323,12 @@ Serbia,ultralights,"['RS', 'SRB']","['YT', 'YU']",['A000-Z999'],"^(YT|YU)(-{0,1}
 Serbia,drones,"['RS', 'SRB']","['YT', 'YU']",['D0000-D9999'],"^(YT|YU)(-{0,1}(D[0-9][0-9][0-9][0-9])){0,1}$"
 Seychelles,general,"['SC', 'SYC']",['S7'],['AAA-ZZZ'],"^(S7)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Sierra Leone,general,"['SL', 'SLE']",['9L'],['AAA-ZZZ'],"^(9L)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Singapore,general,"['SG', 'SGP']","['9V', ' S6']",['AAA-ZZZ'],"^(9V|S6)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Singapore,general,"['SG', 'SGP']","['9V', 'S6']",['AAA-ZZZ'],"^(9V|S6)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Slovakia,general,"['SK', 'SVK']",['OM'],['AAA-ZZZ'],"^(OM)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Slovakia,ultralights,"['SK', 'SVK']",['OM'],['AAAA-ZZZZ'],"^(OM)(-{0,1}([A-Z][A-Z][A-Z][A-Z])){0,1}$"
 Slovakia,microlights,"['SK', 'SVK']",['OM'],['M000-M999'],"^(OM)(-{0,1}(M[0-9][0-9][0-9])){0,1}$"
 Slovakia,gliders,"['SK', 'SVK']",['OM'],['0000-9999'],"^(OM)(-{0,1}([0-9][0-9][0-9][0-9])){0,1}$"
-Slovenia,general,"['SI', 'SVN']",['S5'],"['AAA-9999','DAA-DZZ']","^(S5)(-{0,1}(([A-Z0-9]{3}[0-9]{0,1}|D[A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Slovenia,general,"['SI', 'SVN']",['S5'],"['AAA-9999', 'DAA-DZZ']","^(S5)(-{0,1}(([A-Z0-9]{3}[0-9]{0,1}|D[A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Slovenia,helicopters,"['SI', 'SVN']",['S5'],['HAA-HZZ'],"^(S5)(-{0,1}(H[A-Z][A-Z])){0,1}$"
 Slovenia,ultralights,"['SI', 'SVN']",['S5'],['PAA-PZZ'],"^(S5)(-{0,1}(P[A-Z][A-Z])){0,1}$"
 Slovenia,amature builds,"['SI', 'SVN']",['S5'],['MAA-MZZ'],"^(S5)(-{0,1}(M[A-Z][A-Z])){0,1}$"
@@ -339,7 +339,7 @@ Slovenia,double-seat gliders,"['SI', 'SVN']",['S5'],['7000-7999'],"^(S5)(-{0,1}(
 Slovenia,motorgliders,"['SI', 'SVN']",['S5'],['KAA-KZZ'],"^(S5)(-{0,1}(K[A-Z][A-Z])){0,1}$"
 Slovenia,balloons,"['SI', 'SVN']",['S5'],['OAA-OZZ'],"^(S5)(-{0,1}(O[A-Z][A-Z])){0,1}$"
 Solomon Islands,general,"['SB', 'SLB']",['H4'],['AAA-ZZZ'],"^(H4)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Somalia,general,"['SO', 'SOM']","['6O', ' T5']",['AAA-ZZZ'],"^(6O|T5)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Somalia,general,"['SO', 'SOM']","['6O', 'T5']",['AAA-ZZZ'],"^(6O|T5)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 South Africa,general,"['ZA', 'ZAF']","['S8', 'ZR', 'ZS', 'ZT', 'ZU']",['AAA-ZZZ'],"^(S8|ZR|ZS|ZT|ZU)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 South Sudan,general,"['SS', 'SSD']",['Z8'],['AAA-ZZZ'],"^(Z8)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Spain,general,"['ES', 'ESP']","['AM', 'AN', 'AO', 'EA', 'EB', 'EC', 'ED', 'EE', 'EF', 'EG', 'EH']",['AAA-WZZ'],"^(AM|AN|AO|EA|EB|EC|ED|EE|EF|EG|EH)(-{0,1}(([A-W][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
@@ -353,51 +353,51 @@ Suriname,helicopters,"['SR', 'SUR']",['PZ'],['HAA-HZZ'],"^(PZ)(-{0,1}(H[A-Z][A-Z
 Suriname,commercial,"['SR', 'SUR']",['PZ'],['TAA-TZZ'],"^(PZ)(-{0,1}(T[A-Z][A-Z])){0,1}$"
 Suriname,agricultural,"['SR', 'SUR']",['PZ'],['UAA-UZZ'],"^(PZ)(-{0,1}(U[A-Z][A-Z])){0,1}$"
 Swaziland or Eswatini,general,"['SZ', 'SWZ']","['3D', '3DA', '3DB', '3DC', '3DD', '3DE', '3DF', '3DG', '3DH', '3DI', '3DJ', '3DK', '3DL', '3DM']",['AAA-ZZZ'],"^(3D|3DA|3DB|3DC|3DD|3DE|3DF|3DG|3DH|3DI|3DJ|3DK|3DL|3DM)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Sweden,general,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['AAA-ZZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Sweden,jets,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']","['DAA-DZZ','RAA-RZZ']","^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(D[A-Z][A-Z]|R[A-Z][A-Z])){0,1}$"
-Sweden,helicopters,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['HAA-HZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(H[A-Z][A-Z])){0,1}$"
-Sweden,gliders,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['SAA-UZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}([S-U][A-Z][A-Z])){0,1}$"
-Sweden,ultralights,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']","['VAA-VZZ','YAA-YZZ']","^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(V[A-Z][A-Z]|Y[A-Z][A-Z])){0,1}$"
-Sweden,amuture builds,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['XAA-XZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(X[A-Z][A-Z])){0,1}$"
-Sweden,lighter than air,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['ZAA-ZZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(Z[A-Z][A-Z])){0,1}$"
-Sweden,test and delivery,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', ' 7S', ' 8S']",['A01-Z99'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}([A-Z][0-9][1-9])){0,1}$"
-Switzerland,general,"['CH', 'CHE']","['HB', ' HE']",['AAA-ZZZ'],"^(HB|HE)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Syria,general,"['SY', 'SYR']","['YK', ' 6C']",['AAA-ZZZ'],"^(YK|6C)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Tahiti or French Polynesia,general,"['PF','PYF']",['F-OH'],['AA-ZZ'],"^(F-OH)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Taiwan,general,"['TW', 'TWN']","['B', 'BM', ' BN', ' BO', ' BQ', ' BV', ' BX']",['00000-99999'],"^(B|BM|BN|BO|BQ|BV|BX)(-{0,1}(([0-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
+Sweden,general,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['AAA-ZZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Sweden,jets,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']","['DAA-DZZ', 'RAA-RZZ']","^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(D[A-Z][A-Z]|R[A-Z][A-Z])){0,1}$"
+Sweden,helicopters,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['HAA-HZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(H[A-Z][A-Z])){0,1}$"
+Sweden,gliders,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['SAA-UZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}([S-U][A-Z][A-Z])){0,1}$"
+Sweden,ultralights,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']","['VAA-VZZ', 'YAA-YZZ']","^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(V[A-Z][A-Z]|Y[A-Z][A-Z])){0,1}$"
+Sweden,amuture builds,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['XAA-XZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(X[A-Z][A-Z])){0,1}$"
+Sweden,lighter than air,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['ZAA-ZZZ'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}(Z[A-Z][A-Z])){0,1}$"
+Sweden,test and delivery,"['SE', 'SWE']","['SA', 'SB', 'SC', 'SD', 'SE', 'SF', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', '7S', '8S']",['A01-Z99'],"^(SA|SB|SC|SD|SE|SF|SG|SH|SI|SJ|SK|SL|SM|7S|8S)(-{0,1}([A-Z][0-9][1-9])){0,1}$"
+Switzerland,general,"['CH', 'CHE']","['HB', 'HE']",['AAA-ZZZ'],"^(HB|HE)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Syria,general,"['SY', 'SYR']","['YK', '6C']",['AAA-ZZZ'],"^(YK|6C)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Tahiti or French Polynesia,general,"['PF', 'PYF']",['F-OH'],['AA-ZZ'],"^(F-OH)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Taiwan,general,"['TW', 'TWN']","['B', 'BM', 'BN', 'BO', 'BQ', 'BV', 'BX']",['00000-99999'],"^(B|BM|BN|BO|BQ|BV|BX)(-{0,1}(([0-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Tajikistan,general,"['TJ', 'TJK']",['EY'],['00000-99999'],"^(EY)(-{0,1}(([0-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Tanzania,general,"['TZ', 'TZA']","['5H', '5I']",['AAA-ZZZ'],"^(5H|5I)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Thailand,general,"['TH', 'THA']","['E2', ' HS']",['AAA-ZZZ'],"^(E2|HS)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Thailand,general,"['TH', 'THA']","['E2', 'HS']",['AAA-ZZZ'],"^(E2|HS)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Timor–Leste,general,"['TL', 'TLS']",['4W'],['AAA-ZZZ'],"^(4W)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Togo,general,"['TG', 'TGO']",['5V'],['AAA-ZZZ'],"^(5V)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Tonga,general,"['TO', 'TON']",['A3'],['AAA-ZZZ'],"^(A3)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Trinidad and Tobago,general,"['TT', 'TTO']","['9Y', '9Z']",['AAA-ZZZ'],"^(9Y|9Z)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Tunisia,general,"['TN', 'TUN']","['TS', ' 3V']",['AAA-ZZZ'],"^(TS|3V)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Turkey,general,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['AAA-ZZZ'],"^(TA|TB|TC|YM)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Turkey,balloons,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['BAA-BZZ'],"^(TA|TB|TC|YM)(-{0,1}(B[A-Z][A-Z])){0,1}$"
-Turkey,helicopters,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['HAA-HZZ'],"^(TA|TB|TC|YM)(-{0,1}(H[A-Z][A-Z])){0,1}$"
-Turkey,gliders,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['PAA-PZZ'],"^(TA|TB|TC|YM)(-{0,1}(P[A-Z][A-Z])){0,1}$"
-Turkey,ultralights,"['TR', 'TUR']","['TA', 'TB', 'TC', ' YM']",['UAA-UZZ'],"^(TA|TB|TC|YM)(-{0,1}(U[A-Z][A-Z])){0,1}$"
-Turkey,agricultural,"['TR', 'TUR']","['TA', 'TB', 'TC','YM']",['ZAA-ZZZ'],"^(TA|TB|TC|YM)(-{0,1}(Z[A-Z][A-Z])){0,1}$"
+Tunisia,general,"['TN', 'TUN']","['TS', '3V']",['AAA-ZZZ'],"^(TS|3V)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Turkey,general,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['AAA-ZZZ'],"^(TA|TB|TC|YM)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Turkey,balloons,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['BAA-BZZ'],"^(TA|TB|TC|YM)(-{0,1}(B[A-Z][A-Z])){0,1}$"
+Turkey,helicopters,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['HAA-HZZ'],"^(TA|TB|TC|YM)(-{0,1}(H[A-Z][A-Z])){0,1}$"
+Turkey,gliders,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['PAA-PZZ'],"^(TA|TB|TC|YM)(-{0,1}(P[A-Z][A-Z])){0,1}$"
+Turkey,ultralights,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['UAA-UZZ'],"^(TA|TB|TC|YM)(-{0,1}(U[A-Z][A-Z])){0,1}$"
+Turkey,agricultural,"['TR', 'TUR']","['TA', 'TB', 'TC', 'YM']",['ZAA-ZZZ'],"^(TA|TB|TC|YM)(-{0,1}(Z[A-Z][A-Z])){0,1}$"
 Turkmenistan,general,"['TM', 'TKM']",['EZ'],['A100-Z999'],"^(EZ)(-{0,1}(([A-Z][1-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Turks and Caicos Islands,general,"['TC', 'TCA']",['VQ-T'],['AA-ZZ'],"^(VQ-T)(-{0,1}(([A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Tuvalu,general,"['TV', 'TUV']",['T2'],['AAA-ZZZ'],"^(T2)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Uganda,general,"['UG', 'UGA']",['5X'],['AAA-ZZZ'],"^(5X)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Ukraine,general,"['UA', 'UKR']","['EM', 'EN', 'EO', 'UR', 'US', 'UT', 'UU', 'UV', 'UW', 'UX', 'UY', 'UZ']","['AAA-ZZZ','10000-99999','AAAA-ZZZZ']","^(EM|EN|EO|UR|US|UT|UU|UV|UW|UX|UY|UZ)(-{0,1}(([A-Z][A-Z][A-Z]|[1-9][0-9][0-9][0-9][0-9]|[A-Z][A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Ukraine,general,"['UA', 'UKR']","['EM', 'EN', 'EO', 'UR', 'US', 'UT', 'UU', 'UV', 'UW', 'UX', 'UY', 'UZ']","['AAA-ZZZ', '10000-99999', 'AAAA-ZZZZ']","^(EM|EN|EO|UR|US|UT|UU|UV|UW|UX|UY|UZ)(-{0,1}(([A-Z][A-Z][A-Z]|[1-9][0-9][0-9][0-9][0-9]|[A-Z][A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 United Arab Emirates,general,"['AE', 'ARE']",['A6'],['AAA-ZZZ'],"^(A6)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-United Kingdom,general,"['GB', 'GBR']","['2', ' G', ' M', 'VP', 'VQ', ' VS', 'ZB', 'ZC', 'ZD', 'ZE', 'ZF', 'ZG', 'ZH', 'ZI', 'ZJ', 'ZN', 'ZO', ' ZQ']",['AAAA-ZZZZ'],"^(2|G|M|VP|VQ|VS|ZB|ZC|ZD|ZE|ZF|ZG|ZH|ZI|ZJ|ZN|ZO|ZQ)(-{0,1}(([A-Z][A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-United States,general,"['US', 'USA']","['AA', 'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', ' K', ' N', ' W']","['1-99999','1A-9999Z','1AA-999ZZ']","^(AA|AB|AC|AD|AE|AF|AG|AH|AI|AJ|AK|AL|K|N|W)(-{0,1}(([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})|([A-Z0-9]{1,4}))){0,1}$"
-United States,commercial and private,"['US', 'USA']",['NC'],"['1-99999','1A-9999Z','1AA-999ZZ']","^(NC)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
-United States,gliders,"['US', 'USA']",['NG'],"['1-99999','1A-9999Z','1AA-999ZZ']","^(NG)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
-United States,limited,"['US', 'USA']",['NL'],"['1-99999','1A-9999Z','1AA-999ZZ']","^(NL)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
-United States,restricte,"['US', 'USA']",['NR'],"['1-99999','1A-9999Z','1AA-999ZZ']","^(NR)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
-United States,state,"['US', 'USA']",['NS'],"['1-99999','1A-9999Z','1AA-999ZZ']","^(NS)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
-United States,experimental,"['US', 'USA']",['NX'],"['1-99999','1A-9999Z','1AA-999ZZ']","^(NX)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
+United Kingdom,general,"['GB', 'GBR']","['2', 'G', 'M', 'VP', 'VQ', 'VS', 'ZB', 'ZC', 'ZD', 'ZE', 'ZF', 'ZG', 'ZH', 'ZI', 'ZJ', 'ZN', 'ZO', 'ZQ']",['AAAA-ZZZZ'],"^(2|G|M|VP|VQ|VS|ZB|ZC|ZD|ZE|ZF|ZG|ZH|ZI|ZJ|ZN|ZO|ZQ)(-{0,1}(([A-Z][A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+United States,general,"['US', 'USA']","['AA', 'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', 'K', 'N', 'W']","['1-99999', '1A-9999Z', '1AA-999ZZ']","^(AA|AB|AC|AD|AE|AF|AG|AH|AI|AJ|AK|AL|K|N|W)(-{0,1}(([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})|([A-Z0-9]{1,4}))){0,1}$"
+United States,commercial and private,"['US', 'USA']",['NC'],"['1-99999', '1A-9999Z', '1AA-999ZZ']","^(NC)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
+United States,gliders,"['US', 'USA']",['NG'],"['1-99999', '1A-9999Z', '1AA-999ZZ']","^(NG)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
+United States,limited,"['US', 'USA']",['NL'],"['1-99999', '1A-9999Z', '1AA-999ZZ']","^(NL)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
+United States,restricte,"['US', 'USA']",['NR'],"['1-99999', '1A-9999Z', '1AA-999ZZ']","^(NR)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
+United States,state,"['US', 'USA']",['NS'],"['1-99999', '1A-9999Z', '1AA-999ZZ']","^(NS)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
+United States,experimental,"['US', 'USA']",['NX'],"['1-99999', '1A-9999Z', '1AA-999ZZ']","^(NX)(-{0,1}([1-9][0-9]{0,4}|[1-9][0-9]{0,3}[A-Z]|[1-9][0-9]{0,2}[A-Z]{2})){0,1}$"
 Uruguay,general,"['UY', 'URY']","['CV', 'CW', 'CX']",['AAA-ZZZ'],"^(CV|CW|CX)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Uzbekistan,general,"['UZ', 'UZB']","['UJ', 'UK', 'UL', 'UM']",['10000-99999'],"^(UJ|UK|UL|UM)(-{0,1}(([1-9][0-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
 Vanuatu,general,"['VU', 'VUT']",['YJ'],['AA1-ZZ99'],"^(YJ)(-{0,1}(([A-Z]{2}[1-9][0-9]{0,1})|([A-Z0-9]{1,4}))){0,1}$"
 Vatican City,general,"['VA', 'VAT']",['HV'],['AAA-ZZZ'],"^(HV)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Venezuela,general,"['VE', 'VEN']","['YV', 'YW', 'YX', 'YY', ' 4M']","['1000-9999','100T-999T']","^(YV|YW|YX|YY|4M)(-{0,1}(([1-9][0-9][0-9][0-9]|[1-9][0-9][0-9]T)|([A-Z0-9]{1,4}))){0,1}$"
+Venezuela,general,"['VE', 'VEN']","['YV', 'YW', 'YX', 'YY', '4M']","['1000-9999', '100T-999T']","^(YV|YW|YX|YY|4M)(-{0,1}(([1-9][0-9][0-9][0-9]|[1-9][0-9][0-9]T)|([A-Z0-9]{1,4}))){0,1}$"
 Venezuela,training,"['VE', 'VEN']","['YV', 'YW', 'YX', 'YY', '4M']",['100E-999E'],"^(YV|YW|YX|YY|4M)(-{0,1}([1-9][0-9][0-9]E)){0,1}$"
 Venezuela,official,"['VE', 'VEN']","['YV', 'YW', 'YX', 'YY', '4M']",['O100-O999'],"^(YV|YW|YX|YY|4M)(-{0,1}(O[1-9][0-9][0-9])){0,1}$"
 Vietnam,general,"['VN', 'VNM']","['XV', '3W']",['1000-9999'],"^(XV|3W)(-{0,1}(([1-9][0-9][0-9][0-9])|([A-Z0-9]{1,4}))){0,1}$"
@@ -406,4 +406,4 @@ Vietnam,turbo prop engine,"['VN', 'VNM']","['XV', '3W']",['B100-B999'],"^(XV|3W)
 Vietnam,combustion engine,"['VN', 'VNM']","['XV', '3W']",['C100-C999'],"^(XV|3W)(-{0,1}(C[1-9][0-9][0-9])){0,1}$"
 Yemen,general,"['YE', 'YEM']",['7O'],['AAA-ZZZ'],"^(7O)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
 Zambia,general,"['ZM', 'ZMB']","['9I', '9J']",['AAA-ZZZ'],"^(9I|9J)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
-Zimbabwe,general,"['ZW', 'ZWE']","['Z','Z2']",['AAA-ZZZ'],"^(Z|Z2)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
+Zimbabwe,general,"['ZW', 'ZWE']","['Z', 'Z2']",['AAA-ZZZ'],"^(Z|Z2)(-{0,1}(([A-Z][A-Z][A-Z])|([A-Z0-9]{1,4}))){0,1}$"
diff --git a/requirements.txt b/requirements.txt
index 321085f..4284860 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,1 @@
-pandas>=0.25.0
 python-dotenv>=0.14.0
\ No newline at end of file


Test patch:
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/test_parse.py b/tests/test_parse.py
new file mode 100644
index 0000000..65ffa82
--- /dev/null
+++ b/tests/test_parse.py
@@ -0,0 +1,46 @@
+import unittest
+
+from flydenity.parser import ARParser
+
+class TestParse(unittest.TestCase):
+    def setUp(self):
+        self.parser = ARParser()
+    
+    def test_parse_simple(self):
+        match = self.parser.parse('D-1234')
+        
+        self.assertEqual(match, [
+            {'nation': 'Germany', 'description': 'general', 'iso2': 'DE', 'iso3': 'DEU'},
+            {'nation': 'Germany', 'description': 'gliders', 'iso2': 'DE', 'iso3': 'DEU'}
+        ])
+
+    def test_parse_icao(self):
+        match = self.parser.parse('4Y-AAA')
+
+        self.assertEqual(match, [{'name': 'International Civil Aviation Organization', 'description': 'general'}])
+
+    def test_parse_tahiti(self):
+        match = self.parser.parse('F-OHJJ')
+
+        self.assertEqual(match, [
+            {'nation': 'France', 'description': 'general', 'iso2': 'FR', 'iso3': 'FRA'},
+            {'nation': 'France', 'description': 'overseas territories', 'iso2': 'FR', 'iso3': 'FRA'},
+            {'nation': 'Tahiti or French Polynesia', 'description': 'general', 'iso2': 'PF', 'iso3': 'PYF'}
+        ])
+
+    def test_parse_strict(self):
+        sloppy_reg_sloppy_parser = self.parser.parse('D0815', strict=False)
+        sloppy_reg_strict_parser = self.parser.parse('D0815', strict=True)
+        strict_reg_sloppy_parser = self.parser.parse('D-0815', strict=False)
+        strict_reg_strict_parser = self.parser.parse('D-0815', strict=True)
+        
+        self.assertTrue(sloppy_reg_sloppy_parser == strict_reg_sloppy_parser == strict_reg_strict_parser != sloppy_reg_strict_parser)
+
+    def test_parse_invalid(self):
+        match = self.parser.parse('Hello there')
+
+        self.assertIsNone(match)
+
+
+if __name__ == '__main__':
+    unittest.main()