pattern matching for item references in metadata