Is there a library that allows me to write regexp-like queries for lists of objects, just like java.util.regexp matches strings that are conceptually similar to character lists?
I want to be able to use patterns with greedy / conservative quantifiers, identify groups in matches, etc. Obviously, I would have to provide code to map the request token to the object in the list.
I'm not just trying to save time by not writing my own query parser. I know that implementing regular expressions (against strings) is a well-researched area, and Sun java.util.regex has undoubtedly got rid of this a long time ago. Everything that I write will not be nearly as effective, and I may have to process fairly long lists (but rather simple queries).
Thanks!
Dan
source
share