Commit 5d93e8d7 authored by Senol Korkmaz's avatar Senol Korkmaz

removed some whitespace characters from pattern for more optimization

parent 9f883fd7
...@@ -52,7 +52,7 @@ function dhcp_clean_leases() ...@@ -52,7 +52,7 @@ function dhcp_clean_leases()
foreach (legacy_config_get_interfaces(array("virtual" => false)) as $ifname => $ifarr) { foreach (legacy_config_get_interfaces(array("virtual" => false)) as $ifname => $ifarr) {
if (isset($config['dhcpd'][$ifname]['staticmap'])) { if (isset($config['dhcpd'][$ifname]['staticmap'])) {
foreach($config['dhcpd'][$ifname]['staticmap'] as $static) { foreach($config['dhcpd'][$ifname]['staticmap'] as $static) {
$lease_patterns[] = '(\h*lease\s*[0-9\.]+\s*\{[^\{\}]*hardware\h*ethernet\h*' . $static['mac'] . '[^\{\}]*(.*"[^\{\}]*\}|\})\s?)'; $lease_patterns[] = '(lease\s*[0-9\.]+\s*\{[^\{\}]*hardware ethernet ' . $static['mac'] . '[^\{\}]*(.*"[^\{\}]*\}|\})\s?)';
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment