accept a wildcarded host

This commit is contained in:
mangano-ito 2022-02-09 22:09:34 +09:00
parent 48ab82b81e
commit 016919cf95

View File

@ -37,9 +37,9 @@ def parse_subnetport_file(s):
def parse_subnetport(s): def parse_subnetport(s):
if s.count(':') > 1: if s.count(':') > 1:
rx = r'(?:\[?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$' rx = r'(?:\[?(?:\*\.)?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$'
else: else:
rx = r'([\w\.\-]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$' rx = r'((?:\*\.)?[\w\.\-]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$'
m = re.match(rx, s) m = re.match(rx, s)
if not m: if not m: