function array2pattern( list ) {
	var pattern;
	var i;

	pattern = '(?:';
	for ( i = 0; i < list.length-1; i++ ) {
		pattern += rescape( list[ i ] ) + '|';
	}
	return pattern + rescape( list[ i ] ) + ')';
}
Returns a regular expression pattern which matches a list of strings.

@private
@param {StringArray} list - list of strings to match
@returns {string} regular expression pattern