Its easy by using the attribute$= CSS3 selector which means "ends with" in your jQuery selection:
To Delete 1st character:
$("div[id$=/]").each(function(){
this.id = this.id.substr(1);
});
To Delete Last Character:
$("div[id$=/]").each(function(){
this.id = this.id.substr(0,this.id.length - 1);
});