1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Include '-' in regex for globs

Ticket: CM-3346
Reviewed By:
Testing Done: Sanity test
This commit is contained in:
Roopa Prabhu
2014-10-24 20:48:38 -07:00
parent 7baa2093ba
commit 1d591e73b5

View File

@@ -143,8 +143,8 @@ class moduleBase(object):
start_index = 0
end_index = 0
try:
regexs = [re.compile(r"([A-Za-z0-9]+[A-Za-z])(\d+)\-(\d+)(.*)"),
re.compile(r"([A-Za-z0-9]+)\[(\d+)\-(\d+)\](.*)")]
regexs = [re.compile(r"([A-Za-z0-9\-]+[A-Za-z])(\d+)\-(\d+)(.*)"),
re.compile(r"([A-Za-z0-9\-]+)\[(\d+)\-(\d+)\](.*)")]
for r in regexs:
m = r.match(expr)
if not m: