From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: location@lists.ipfire.org Subject: [PATCH] location-import.in: optimise regular expression for filtering ASN allocations to other RIRs when parsing ARIN AS names file Date: Sun, 20 Jun 2021 12:43:07 +0200 Message-ID: <234e5464-f24f-9725-2cdc-0b0f4173e7c1@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8511939832194741380==" List-Id: --===============8511939832194741380== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable https://lists.ipfire.org/pipermail/location/2021-June/000394.html Reported-by: Michael Tremer Signed-off-by: Peter M=C3=BCller --- src/python/location-importer.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/location-importer.in b/src/python/location-importer.in index b235db7..ff90d91 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -811,7 +811,7 @@ class CLI(object): continue =20 # Skip any AS name that appears to be a placeholder for a different RIR = or entity... - if re.match(r"^(ASN-BLK|)(AFCONC|AFRINIC|APNIC|ASNBLK|DNIC|LACNIC|RIPE|I= ANA)(\d?$|\-.*)", name): + if re.match(r"^(ASN-BLK|)(AFCONC|AFRINIC|APNIC|ASNBLK|DNIC|LACNIC|RIPE|I= ANA)(?:\d?$|\-)", name): continue =20 # Bail out in case the AS name contains anything we do not expect here... --=20 2.26.2 --===============8511939832194741380==--