Ron,

are you sure that a general-purpose pattern matching library like Optima (https://github.com/m2ym/optima) would not be better than a generalized regular expression matching library for what you need to do?

-Hans


2014-03-19 1:15 GMT+01:00 Ron Garret <ron@flownet.com>:
The theory of regular expressions can be applied to any kind of sequence, not just strings.  This would be potentially useful for pattern-matching applications, where current approaches make it very cumbersome to say things like, “Match a list containing between three and five integers”.  This sort of thing is easy to express in CL-PPCRE tree-like notation as, e.g. (:repetition (:type integer) 3 5)

My question is: how hard would be it be to adapt the CL-PPCRE code to handle things like this?  Is there a sequence-type-agnostic core in CL-PPCRE that could be easily re-used for this purpose, or is the assumption that regexps only apply to strings woven deeply into the code?

Thanks,
rg