]> git.proxmox.com Git - pve-common.git/commit
Tools::IPV4OCTET: move longer alternatives forward
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 5 Oct 2015 07:30:57 +0000 (09:30 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 5 Oct 2015 10:31:24 +0000 (12:31 +0200)
commitcd9bd2526a6c7a74d3f8ce3de32bc149d96324f3
tree591a889b7c560c39f8a2bec580ef0049bc43fa8e
parent176b1186bd9366b4035a25bbf37011b84bbb98af
Tools::IPV4OCTET: move longer alternatives forward

In an alternation /a|b|c/ the first match matches, so while
'1.1.1.121' matches /^$IPV4RE$/ (note the ^ and $ anchors),
parsing a line like /nameserver ($IPV4RE)/ would only
extract '1.1.1.12', ignoring the last '1' due to the /[1-9]/
alternative matching before the /1[0-9]/ one.
src/PVE/Tools.pm