[cl-ppcre-devel] Using scan
Edi Weitz
edi at agharta.de
Mon Jul 7 13:48:32 UTC 2008
On Mon, 7 Jul 2008 09:45:11 -0400, Gary King <gwking at metabang.com> wrote:
> Try something like this:
>
> (defun full-match-p (regex string)
> (multiple-value-bind (start end array-1 array-2)
> (cl-ppcre:scan regex string)
> (declare (ignore array-1 array-2))
> (and (= start 0)
> (= end (length string)))))
Simpler:
(scan "^ABC$" "ABC")
(scan "^ABC$" "ABCD")
The first return value of SCAN serves as a generalized boolean.
More information about the Cl-ppcre-devel
mailing list