add regexp and excludes matching rules; and fixes some incompatible rules