updated delimiter for preg_match when determine the selected state for a menu item to allow for # symbols