preg_match simplifed and fixed to match class="" and class=''