modpost: expand pattern matching to support substring matches