WSS_FilterOnTopLevelItemDateRangesAndEmailDomains.rb
def any_domain_matches(domain_regexes,addresses)
	return addresses.map{|a|a.getAddress}.any? do |address|
		next domain_regexes.any?{|r| address =~ r}
	end
end
# Test a collection of domain regular expressions against a collection of
# addresses.  If there are any matches, return true.  If there are no matches
# then return false.  Call to any? should immediately return true the first
# time there is a match.  Worst case there are no matches and all addresses are
# compared before determining there is no match.
Test a collection of domain regular expressions against a collection of
addresses.  If there are any matches, return true.  If there are no matches
then return false.  Call to any. should immediately return true the first
time there is a match.  Worst case there are no matches and all addresses are
compared before determining there is no match.
Test a collection of domain regular expressions against a collection of addresses . If there are any matches return true . If there are no matches then return false . Call to any . should immediately return true the first time there is a match . Worst case there are no matches and all addresses are compared before determining there is no match .
def any_domain_matches(domain_regexes,addresses)
	return addresses.map{|a|a.getAddress}.any? do |address|
		next domain_regexes.any?{|r| address =~ r}
	end
end
def any_domain_matches ( domain_regexes , addresses ) return addresses . map { | a | a . getAddress } . any? do | address | next domain_regexes . any? { | r | address =~ r } end end
Test a collection of domain regular expressions against a collection of
addresses.
Test a collection of domain regular expressions against a collection of addresses .
domain_regexes
addresses