dojox.regexp.host = function(/*Object?*/flags){	// summary: Builds a RE that matches a host	// description: A host is a domain name or an IP address, possibly followed by a port number.	// flags: An object.	//    flags.allowIP  Allow an IP address for hostname.  Default is true.	//    flags.allowLocal  Allow the host to be "localhost".  Default is false.	//    flags.allowPort  Allow a port number to be present.  Default is true.	//    flags in regexp.ipAddress can be applied.	//    flags in regexp.tld can be applied.	// assign default values to missing paramters	flags = (typeof flags == "object") ? flags : {};	if(typeof flags.allowIP != "boolean"){ flags.allowIP = true; }	if(typeof flags.allowLocal != "boolean"){ flags.allowLocal = false; }	if(typeof flags.allowPort != "boolean"){ flags.allowPort = true; }	// Domain names can not end with a dash.	var domainNameRE = "([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+" + dojox.regexp.tld(flags);	// port number RE	var portRE = flags.allowPort ? "(\\:\\d+)?" : "";	// build host RE	var hostNameRE = domainNameRE;	if(flags.allowIP){ hostNameRE += "|" +  dojox.regexp.ipAddress(flags); }	if(flags.allowLocal){ hostNameRE += "|localhost"; }	return "(" + hostNameRE + ")" + portRE; // String}
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/c7089e06efc9fd70ea47a70093c5cf6f9342f37d/regexp.js/buggy/validate/regexp.js