Extract metadata for includes and excludes