I am unable to delete a div with an id with a period or an asterix.
Global method if you don't know what "xxx" is.
var x = $("span,div"); x.each ( function () { var y = $(this); if ( /[\.\*]/.test (y.attr ('id') ) ) y.remove (); } );