[cl-ppcre-devel] Re: cl-ppcre question

Hi Arthur! Sorry for the late reply, I was on vacation. On Sun, 29 Feb 2004 22:36:46 -0600, Arthur Gold <artiegold@austin.rr.com> wrote:
A quick question from and old (out of work) programmer who has suddenly had a little Common Lisp work fall in his lap (yea!): I've been starting to work with cl-ppcre for a project, and the following result confuses me --
(ppcre::scan "(\w)*" "A_B_C")
returns NIL
Shouldn't "(\w)*" match any sequence of letters or underscores?
Many thanks for your time.
Try (PPCRE::SCAN "(\\w)*" "A_B_C") instead. The first backslash is necessary because of CL's string syntax, the second backslash is the one that's actually "sent" to CL-PPCRE. * (princ "\w") w "w" * (princ "\\w") \w "\\w" If you think you're using too much backslashes you might want to check CL-INTERPOL. Cheers, Edi. PS: Please use the CL-PPCRE mailing list if possible.
participants (1)
-
Edi Weitz