Below is the code from extjs 4.1 RC3 api.
Looking at validIdRe, you guys are disallowing id start with number. Is there any reason for this?
{
xtype:"panel",
id:"099890-333"
}
Code:escapeId: (function()
{
var validIdRe = /^[a-zA-Z_][a-zA-Z0-9_\-]*$/i,
escapeRx = /([\W]{1})/g,
escapeFn = function(match, capture){
return "\\" + capture;
};
return function(id) {
return validIdRe.test(id)
? id
: id.replace(escapeRx, escapeFn);
};
}())

