Is there a library that would let me write regexp-like queries for lists of objects, just like java.util.regexp matches against strings, which are conceptually like lists of characters?
I want to be able to use patterns with greedy/conservative quantifiers, identifying groups in matches, etc. Obviously I would have to provide the code for matching a query token against an object in the list.
I'm not just trying to save time not writing my own query parser. I'm aware that regexp implementations (against strings) are a well researched area, and Sun's java.util.regex has surely had the hell optimized out of it long ago. Anything I write won't be nearly as efficient, and I might have to handle quite long lists (but pretty simple queries).
Thanks!