Added regexp support for hasClass() and removeClass()