More robust classname regex to prevent removal of incorrect class names (see #25)