Extending regexps to other kinds of sequences

Hans Hübner hans.huebner at gmail.com
Wed Mar 19 09:40:08 UTC 2014


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 at 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-ppcre-devel/attachments/20140319/496f0160/attachment.html>


More information about the Cl-ppcre-devel mailing list