On Tue, Mar 08, 2011 at 02:29:23PM -0600, Stan Hoeppner wrote: > So this would mean the simpler expressions would be faster? That makes > me wonder why Enemies List[1] uses complex expressions, each one > precisely matching a specific rDNS pattern,
To avoid false positives by matching in the wrong context. The performance can be improved by grouping: /^\d+\.\d+\.\d+\.\d+$/ DUNNO only hostnames matched below if /\.net$/ # patterns for ".net" hosts ... /^/ DUNNO done with .net[ endif if /\.net\.au$/ # patterns for ".net.au" hosts ... /^/ DUNNO done with .net.au endif if /\.com$/ # patterns for ".com" hosts ... /^/ DUNNO done with .com endif if /\.edu$/ # patterns for ".edu" hosts ... /^/ DUNNO done with .edu endif -- Viktor.