rem: return pattern.replace(/[a-zA-Z]+/g, function(match){ 
add: return pattern.replace(/([a-z])\1*/ig, function(match){ 
context: 	return pattern.replace(/[a-zA-Z]+/g, function(match){		// Build a simple regexp without parenthesis, which would ruin the match list		var s;		var c = match.charAt(0);		var l = match.length;		switch(c){			case 'y':				s = '\\d' + ((l==2) ? '{2,4}' : '+');				break;			case 'M':				s = (l>2) ? '\\S+' : '\\d{1,2}';				break;			case 'd':				s = '\\d{1,2}';				break;		    case 'E':				s = '\\S+';				break;			case 'h': 			case 'H': 			case 'K': 			case 'k':				s = '\\d{1,2}';				break;			case 'm':			case 's':				s = '[0-5]\\d';				break;			case 'S':				s = '\\d{1,3}';				break;			case 'a':				var am = options.am || info.am || 'AM';				var pm = options.pm || info.pm || 'PM';				if(options.strict){					s = am + '|' + pm;				}else{					s = am;					s += (am != am.toLowerCase()) ? '|' + am.toLowerCase() : '';					s += '|';					s += (pm != pm.toLowerCase()) ? pm + '|' + pm.toLowerCase() : pm;				}				break;			default:				dojo.unimplemented("parse of date format, pattern=" + pattern);		}		if(groups){ groups.push(match); }//FIXME: replace whitespace within final regexp with more flexible whitespace match instead?		//tolerate whitespace		return '\\s*(' + s + ')\\s*';	});
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/format.js/clean/www/resources/dojo-ajax/src/date/format.js