function getmatches(text)
	for line in string.gmatch(text, "[^\r\n]+") do
		m,n = string.match(line,"^dhcp%-range[^,]*,([^,]+),([^,]+)")
		if m ~= nil then 
			print(m,n) 
		end
	end
end

s = [[dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
stop-dns-rebind
rebind-localhost-ok
dhcp-broadcast=tag:needs-broadcast

dhcp-range=lan,192.168.34.165,192.168.34.179,255.255.255.0,12h
no-dhcp-interface=eth0]]

getmatches(s)
