Sorting and matching utility using configurable string, glob, regular expression, and/or function matchers