From b45e5f44ad34c34b3e8106b0f205d7d603c3b421 2014-04-10 21:06:38 From: Min RK Date: 2014-04-10 21:06:38 Subject: [PATCH] Merge pull request #5506 from takluyver/i5491 Fix ipconfig regex pattern --- diff --git a/IPython/utils/localinterfaces.py b/IPython/utils/localinterfaces.py index 2e9f842..aee852b 100644 --- a/IPython/utils/localinterfaces.py +++ b/IPython/utils/localinterfaces.py @@ -122,7 +122,7 @@ def _load_ips_ip(): addrs.append(blocks[1].split('/')[0]) _populate_from_list(addrs) -_ipconfig_ipv4_pat = re.compile(r'ipv4.*(\d+\.\d+\.\d+\.\d+)$', re.IGNORECASE) +_ipconfig_ipv4_pat = re.compile(r'ipv4.*?(\d+\.\d+\.\d+\.\d+)$', re.IGNORECASE) def _load_ips_ipconfig(): """load ip addresses from `ipconfig` output (Windows)"""