[cl-ppcre-devel] scan/property behavior?

Cyrus Harmon ch-lisp at bobobeach.com
Sun Apr 8 02:04:43 UTC 2012


I was noticing some strange behavior with cxml-rng and David Lichteblau pointed out that the problem might be due to cl-ppcre and provided this example:

(let ((regex1 '(:SEQUENCE :start-anchor 
                (:greedy-repetition 0 42 (:property digit-char-p))
                #\-))
      (regex2 '(:SEQUENCE :start-anchor
                (:property digit-char-p)
                #\-))
      (str "8-"))
  (values (multiple-value-list (ppcre:scan regex1 str))
          (multiple-value-list (ppcre:scan regex2 str))))


Regex1 works as expected (it matches 8-) but the second one doesn't. It's possible I don't understand (well more than possible) how :property works, but I would have expected either both or neither of these to fail. Could this be due to a bug in cl-ppcre?

thanks,

Cyrus





More information about the Cl-ppcre-devel mailing list