Skip to content

Commit

Permalink
fix regex_v6 string (#239)
Browse files Browse the repository at this point in the history
example:
          inet6 addr: fe80::f471:b5ff:fea0:2687/64 Scope:Link
  • Loading branch information
xufan6 committed Mar 30, 2021
1 parent 56df5f6 commit e327858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ def regex_v6(reg): # ipv6 正则提取
if os_name == 'nt': # Windows: IPv4 xxx: ::1
regex_str = r'IPv6 .*: ([\:\dabcdef]*)?\W'
else:
regex_str = r'inet6 (?:addr\:)?([\:\dabcdef]*)?[\s/%]'
regex_str = r'inet6 (?:addr\:\s*)?([\:\dabcdef]*)?[\s/%]'
return _ip_regex_match(regex_str, reg)

0 comments on commit e327858

Please sign in to comment.